mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '1.7.x' into generak-sdk-1.7.x
This commit is contained in:
@@ -81,7 +81,7 @@ return [
|
||||
],
|
||||
Exception::GENERAL_ROUTE_NOT_FOUND => [
|
||||
'name' => Exception::GENERAL_ROUTE_NOT_FOUND,
|
||||
'description' => 'The requested route was not found. Please refer to the API docs and try again.',
|
||||
'description' => 'Route not found. Please ensure the endpoint is configured correctly and that the API route is valid for this SDK version. Refer to the API docs for more details.',
|
||||
'code' => 404,
|
||||
],
|
||||
Exception::GENERAL_CURSOR_NOT_FOUND => [
|
||||
@@ -499,6 +499,11 @@ return [
|
||||
'description' => 'The requested file token has expired.',
|
||||
'code' => 401,
|
||||
],
|
||||
Exception::TOKEN_RESOURCE_TYPE_INVALID => [
|
||||
'name' => Exception::TOKEN_RESOURCE_TYPE_INVALID,
|
||||
'description' => 'The resource type for the token is invalid.',
|
||||
'code' => 400,
|
||||
],
|
||||
|
||||
/** VCS */
|
||||
Exception::INSTALLATION_NOT_FOUND => [
|
||||
|
||||
@@ -253,13 +253,30 @@ return [
|
||||
'adapters' => [
|
||||
'static' => [
|
||||
'key' => 'static',
|
||||
'buildCommand' => 'flutter build web',
|
||||
'installCommand' => '',
|
||||
'buildCommand' => 'flutter build web --release -t lib/main.dart',
|
||||
'installCommand' => 'flutter pub get',
|
||||
'outputDirectory' => './build/web',
|
||||
'startCommand' => 'bash helpers/server.sh',
|
||||
],
|
||||
],
|
||||
],
|
||||
'react-native' => [
|
||||
'key' => 'react-native',
|
||||
'name' => 'React Native',
|
||||
'screenshotSleep' => 3000,
|
||||
'buildRuntime' => 'node-22',
|
||||
'runtimes' => getVersions($templateRuntimes['NODE']['versions'], 'node'),
|
||||
'adapters' => [
|
||||
'static' => [
|
||||
'key' => 'static',
|
||||
'buildCommand' => 'npm run build',
|
||||
'installCommand' => 'npm install',
|
||||
'outputDirectory' => './dist',
|
||||
'startCommand' => 'bash helpers/server.sh',
|
||||
'fallbackFile' => 'index.html'
|
||||
]
|
||||
]
|
||||
],
|
||||
'vite' => [
|
||||
'key' => 'vite',
|
||||
'name' => 'Vite',
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<style>
|
||||
a.button {
|
||||
display: inline-block;
|
||||
background: #fd366e;
|
||||
background: {{accentColor}};
|
||||
color: #ffffff;
|
||||
border-radius: 8px;
|
||||
height: 48px;
|
||||
@@ -88,7 +88,7 @@
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-color: #fd366e;
|
||||
border-color: {{accentColor}};
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
margin-right: 24px;
|
||||
@@ -126,7 +126,7 @@
|
||||
<td>
|
||||
<img
|
||||
height="32px"
|
||||
src="https://cloud.appwrite.io/images/mails/logo.png"
|
||||
src="{{logoUrl}}"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -164,7 +164,7 @@
|
||||
<tr>
|
||||
<td style="padding-left: 4px; padding-right: 4px">
|
||||
<a
|
||||
href="https://twitter.com/appwrite"
|
||||
href="{{twitterUrl}}"
|
||||
class="social-icon"
|
||||
title="Twitter"
|
||||
>
|
||||
@@ -173,7 +173,7 @@
|
||||
</td>
|
||||
<td style="padding-left: 4px; padding-right: 4px">
|
||||
<a
|
||||
href="https://appwrite.io/discord"
|
||||
href="{{discordUrl}}"
|
||||
class="social-icon"
|
||||
>
|
||||
<img src="https://cloud.appwrite.io/images/mails/discord.png" height="24" width="24" />
|
||||
@@ -181,7 +181,7 @@
|
||||
</td>
|
||||
<td style="padding-left: 4px; padding-right: 4px">
|
||||
<a
|
||||
href="https://github.com/appwrite/appwrite"
|
||||
href="{{githubUrl}}"
|
||||
class="social-icon"
|
||||
>
|
||||
<img src="https://cloud.appwrite.io/images/mails/github.png" height="24" width="24" />
|
||||
@@ -191,11 +191,11 @@
|
||||
</table>
|
||||
<table style="width: auto; margin: 0 auto; margin-top: 60px">
|
||||
<tr>
|
||||
<td><a href="https://appwrite.io/terms">Terms</a></td>
|
||||
<td><a href="{{termsUrl}}">Terms</a></td>
|
||||
<td style="color: #e8e9f0">
|
||||
<div style="margin: 0 8px">|</div>
|
||||
</td>
|
||||
<td><a href="https://appwrite.io/privacy">Privacy</a></td>
|
||||
<td><a href="{{privacyUrl}}">Privacy</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="text-align: center" align="center">
|
||||
|
||||
@@ -134,7 +134,7 @@ return [
|
||||
[
|
||||
'key' => 'react-native',
|
||||
'name' => 'React Native',
|
||||
'version' => '0.7.3',
|
||||
'version' => '0.7.4',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-react-native',
|
||||
'package' => 'https://npmjs.com/package/react-native-appwrite',
|
||||
'enabled' => true,
|
||||
|
||||
@@ -4485,26 +4485,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n"
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -7976,26 +7976,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n"
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -7525,26 +7525,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n"
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -3381,13 +3381,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -3513,13 +3513,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -4059,13 +4059,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -4485,26 +4485,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
@@ -6281,6 +6261,17 @@
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6399,13 +6390,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
@@ -6498,6 +6489,17 @@
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6565,6 +6567,17 @@
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7600,457 +7613,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"\/tokens\/buckets\/{bucketId}\/files\/{fileId}": {
|
||||
"get": {
|
||||
"summary": "List tokens",
|
||||
"operationId": "tokensList",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Resource Tokens List",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"$ref": "#\/components\/schemas\/resourceTokenList"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "list",
|
||||
"group": "files",
|
||||
"weight": 439,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/list.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "bucketId",
|
||||
"description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<BUCKET_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "fileId",
|
||||
"description": "File unique ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "queries",
|
||||
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"default": []
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"summary": "Create file token",
|
||||
"operationId": "tokensCreateFileToken",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"$ref": "#\/components\/schemas\/resourceToken"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "createFileToken",
|
||||
"group": "files",
|
||||
"weight": 436,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "bucketId",
|
||||
"description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<BUCKET_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "fileId",
|
||||
"description": "File unique ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expire": {
|
||||
"type": "string",
|
||||
"description": "Token expiry date",
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}": {
|
||||
"get": {
|
||||
"summary": "Get token",
|
||||
"operationId": "tokensGet",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a token by its unique ID.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"$ref": "#\/components\/schemas\/resourceToken"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "get",
|
||||
"group": "tokens",
|
||||
"weight": 437,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "Token ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"summary": "Update token",
|
||||
"operationId": "tokensUpdate",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"$ref": "#\/components\/schemas\/resourceToken"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "update",
|
||||
"group": "tokens",
|
||||
"weight": 440,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/update.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "Token unique ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expire": {
|
||||
"type": "string",
|
||||
"description": "File token expiry date",
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete token",
|
||||
"operationId": "tokensDelete",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Delete a token by its unique ID.",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No content"
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "delete",
|
||||
"group": "tokens",
|
||||
"weight": 441,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/delete.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "Token ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}\/jwt": {
|
||||
"get": {
|
||||
"summary": "Get token as JWT",
|
||||
"operationId": "tokensGetJWT",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "JWT",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"$ref": "#\/components\/schemas\/jwt"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "getJWT",
|
||||
"group": "tokens",
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get-j-w-t.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "File token ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
@@ -8282,30 +7844,6 @@
|
||||
"files"
|
||||
]
|
||||
},
|
||||
"resourceTokenList": {
|
||||
"description": "Resource Tokens List",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"description": "Total number of tokens documents that matched your query.",
|
||||
"x-example": 5,
|
||||
"format": "int32"
|
||||
},
|
||||
"tokens": {
|
||||
"type": "array",
|
||||
"description": "List of tokens.",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/resourceToken"
|
||||
},
|
||||
"x-example": ""
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"total",
|
||||
"tokens"
|
||||
]
|
||||
},
|
||||
"teamList": {
|
||||
"description": "Teams List",
|
||||
"type": "object",
|
||||
@@ -9502,61 +9040,6 @@
|
||||
"chunksUploaded"
|
||||
]
|
||||
},
|
||||
"resourceToken": {
|
||||
"description": "ResourceToken",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$id": {
|
||||
"type": "string",
|
||||
"description": "Token ID.",
|
||||
"x-example": "bb8ea5c16897e"
|
||||
},
|
||||
"$createdAt": {
|
||||
"type": "string",
|
||||
"description": "Token creation date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"$permissions": {
|
||||
"type": "array",
|
||||
"description": "Token permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": [
|
||||
"read(\"any\")"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "Resource ID.",
|
||||
"x-example": "5e5ea5c168bb8:5e5ea5c168bb8"
|
||||
},
|
||||
"resourceType": {
|
||||
"type": "string",
|
||||
"description": "Resource type.",
|
||||
"x-example": "files"
|
||||
},
|
||||
"expire": {
|
||||
"type": "string",
|
||||
"description": "Token expiration date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"accessedAt": {
|
||||
"type": "string",
|
||||
"description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"$id",
|
||||
"$createdAt",
|
||||
"$permissions",
|
||||
"resourceId",
|
||||
"resourceType",
|
||||
"expire",
|
||||
"accessedAt"
|
||||
]
|
||||
},
|
||||
"team": {
|
||||
"description": "Team",
|
||||
"type": "object",
|
||||
|
||||
@@ -3386,13 +3386,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -3518,13 +3518,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -4064,13 +4064,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -8044,26 +8044,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
@@ -8967,6 +8947,14 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Length of index. Maximum of 100",
|
||||
"x-example": null,
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -25729,6 +25717,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -26372,6 +26361,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -29014,6 +29004,17 @@
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -29132,13 +29133,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
@@ -29231,6 +29232,17 @@
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -29298,6 +29310,17 @@
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -30581,7 +30604,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "list",
|
||||
"group": "files",
|
||||
"weight": 439,
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -30592,8 +30615,7 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -30604,8 +30626,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -30647,7 +30668,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -30668,14 +30689,13 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -30686,8 +30706,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -30723,14 +30742,6 @@
|
||||
"description": "Token expiry date",
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30773,8 +30784,7 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -30785,8 +30795,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -30808,7 +30817,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
@@ -30824,19 +30833,18 @@
|
||||
"x-appwrite": {
|
||||
"method": "update",
|
||||
"group": "tokens",
|
||||
"weight": 440,
|
||||
"weight": 439,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/update.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -30847,8 +30855,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -30874,14 +30881,6 @@
|
||||
"description": "File token expiry date",
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30904,7 +30903,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "delete",
|
||||
"group": "tokens",
|
||||
"weight": 441,
|
||||
"weight": 440,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -30915,8 +30914,7 @@
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -30927,8 +30925,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -30945,70 +30942,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}\/jwt": {
|
||||
"get": {
|
||||
"summary": "Get token as JWT",
|
||||
"operationId": "tokensGetJWT",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "JWT",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"$ref": "#\/components\/schemas\/jwt"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "getJWT",
|
||||
"group": "tokens",
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get-j-w-t.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "File token ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/users": {
|
||||
"get": {
|
||||
"summary": "List users",
|
||||
@@ -37220,6 +37153,15 @@
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Index attributes length.",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"description": "Index orders.",
|
||||
@@ -37246,6 +37188,7 @@
|
||||
"status",
|
||||
"error",
|
||||
"attributes",
|
||||
"lengths",
|
||||
"$createdAt",
|
||||
"$updatedAt"
|
||||
]
|
||||
@@ -38336,16 +38279,6 @@
|
||||
"description": "Token creation date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"$permissions": {
|
||||
"type": "array",
|
||||
"description": "Token permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": [
|
||||
"read(\"any\")"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "Resource ID.",
|
||||
@@ -38361,6 +38294,11 @@
|
||||
"description": "Token expiration date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string",
|
||||
"description": "JWT encoded string.",
|
||||
"x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
|
||||
},
|
||||
"accessedAt": {
|
||||
"type": "string",
|
||||
"description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.",
|
||||
@@ -38370,10 +38308,10 @@
|
||||
"required": [
|
||||
"$id",
|
||||
"$createdAt",
|
||||
"$permissions",
|
||||
"resourceId",
|
||||
"resourceType",
|
||||
"expire",
|
||||
"secret",
|
||||
"accessedAt"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -3068,13 +3068,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -3202,13 +3202,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -3752,13 +3752,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
@@ -7525,26 +7525,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/components\/schemas\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
@@ -8368,6 +8348,14 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Length of index. Maximum of 100",
|
||||
"x-example": null,
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -17281,6 +17269,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -17696,6 +17685,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -20292,6 +20282,17 @@
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -20412,13 +20413,13 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100
|
||||
"x-example": -1,
|
||||
"default": -1
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
@@ -20511,6 +20512,17 @@
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -20580,6 +20592,17 @@
|
||||
"x-example": "<FILE_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": ""
|
||||
},
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -21662,7 +21685,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "list",
|
||||
"group": "files",
|
||||
"weight": 439,
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -21673,22 +21696,19 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -21730,7 +21750,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -21751,28 +21771,25 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -21808,14 +21825,6 @@
|
||||
"description": "Token expiry date",
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21858,22 +21867,19 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -21895,7 +21901,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
@@ -21911,33 +21917,30 @@
|
||||
"x-appwrite": {
|
||||
"method": "update",
|
||||
"group": "tokens",
|
||||
"weight": 440,
|
||||
"weight": 439,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/update.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -21963,14 +21966,6 @@
|
||||
"description": "File token expiry date",
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21993,7 +21988,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "delete",
|
||||
"group": "tokens",
|
||||
"weight": 441,
|
||||
"weight": 440,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -22004,22 +21999,19 @@
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -22036,72 +22028,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}\/jwt": {
|
||||
"get": {
|
||||
"summary": "Get token as JWT",
|
||||
"operationId": "tokensGetJWT",
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "JWT",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"$ref": "#\/components\/schemas\/jwt"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "getJWT",
|
||||
"group": "tokens",
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get-j-w-t.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "File token ID.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>"
|
||||
},
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/users": {
|
||||
"get": {
|
||||
"summary": "List users",
|
||||
@@ -27193,6 +27119,15 @@
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Index attributes length.",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"description": "Index orders.",
|
||||
@@ -27219,6 +27154,7 @@
|
||||
"status",
|
||||
"error",
|
||||
"attributes",
|
||||
"lengths",
|
||||
"$createdAt",
|
||||
"$updatedAt"
|
||||
]
|
||||
@@ -28309,16 +28245,6 @@
|
||||
"description": "Token creation date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"$permissions": {
|
||||
"type": "array",
|
||||
"description": "Token permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": [
|
||||
"read(\"any\")"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "Resource ID.",
|
||||
@@ -28334,6 +28260,11 @@
|
||||
"description": "Token expiration date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string",
|
||||
"description": "JWT encoded string.",
|
||||
"x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
|
||||
},
|
||||
"accessedAt": {
|
||||
"type": "string",
|
||||
"description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.",
|
||||
@@ -28343,10 +28274,10 @@
|
||||
"required": [
|
||||
"$id",
|
||||
"$createdAt",
|
||||
"$permissions",
|
||||
"resourceId",
|
||||
"resourceType",
|
||||
"expire",
|
||||
"secret",
|
||||
"accessedAt"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -4625,26 +4625,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n"
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -8107,26 +8107,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n"
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -7644,26 +7644,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n"
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
|
||||
@@ -3530,12 +3530,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -3661,12 +3661,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -4211,12 +4211,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -4631,26 +4631,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
@@ -6439,6 +6419,15 @@
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6554,12 +6543,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
@@ -6637,6 +6626,15 @@
|
||||
"x-enum-keys": [],
|
||||
"default": "",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -6707,6 +6705,15 @@
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7732,451 +7739,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/buckets\/{bucketId}\/files\/{fileId}": {
|
||||
"get": {
|
||||
"summary": "List tokens",
|
||||
"operationId": "tokensList",
|
||||
"consumes": [],
|
||||
"produces": [
|
||||
"application\/json"
|
||||
],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "List all the tokens created for a specific file or bucket. You can use the query params to filter your results.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Resource Tokens List",
|
||||
"schema": {
|
||||
"$ref": "#\/definitions\/resourceTokenList"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "list",
|
||||
"group": "files",
|
||||
"weight": 439,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/list.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterList all the tokens created for a specific file or bucket. You can use the query params to filter your results.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "bucketId",
|
||||
"description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<BUCKET_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "fileId",
|
||||
"description": "File unique ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "queries",
|
||||
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire",
|
||||
"required": false,
|
||||
"type": "array",
|
||||
"collectionFormat": "multi",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [],
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"summary": "Create file token",
|
||||
"operationId": "tokensCreateFileToken",
|
||||
"consumes": [
|
||||
"application\/json"
|
||||
],
|
||||
"produces": [
|
||||
"application\/json"
|
||||
],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
"schema": {
|
||||
"$ref": "#\/definitions\/resourceToken"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "createFileToken",
|
||||
"group": "files",
|
||||
"weight": 436,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "bucketId",
|
||||
"description": "Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https:\/\/appwrite.io\/docs\/server\/storage#createBucket).",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<BUCKET_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "fileId",
|
||||
"description": "File unique ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expire": {
|
||||
"type": "string",
|
||||
"description": "Token expiry date",
|
||||
"default": null,
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"default": [],
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}": {
|
||||
"get": {
|
||||
"summary": "Get token",
|
||||
"operationId": "tokensGet",
|
||||
"consumes": [],
|
||||
"produces": [
|
||||
"application\/json"
|
||||
],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a token by its unique ID.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
"schema": {
|
||||
"$ref": "#\/definitions\/resourceToken"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "get",
|
||||
"group": "tokens",
|
||||
"weight": 437,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a token by its unique ID.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "Token ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>",
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"summary": "Update token",
|
||||
"operationId": "tokensUpdate",
|
||||
"consumes": [
|
||||
"application\/json"
|
||||
],
|
||||
"produces": [
|
||||
"application\/json"
|
||||
],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
"schema": {
|
||||
"$ref": "#\/definitions\/resourceToken"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "update",
|
||||
"group": "tokens",
|
||||
"weight": 440,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/update.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "Token unique ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"expire": {
|
||||
"type": "string",
|
||||
"description": "File token expiry date",
|
||||
"default": null,
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"default": null,
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete token",
|
||||
"operationId": "tokensDelete",
|
||||
"consumes": [
|
||||
"application\/json"
|
||||
],
|
||||
"produces": [],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Delete a token by its unique ID.",
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No content"
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "delete",
|
||||
"group": "tokens",
|
||||
"weight": 441,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/delete.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterDelete a token by its unique ID.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "Token ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>",
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}\/jwt": {
|
||||
"get": {
|
||||
"summary": "Get token as JWT",
|
||||
"operationId": "tokensGetJWT",
|
||||
"consumes": [],
|
||||
"produces": [
|
||||
"application\/json"
|
||||
],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "JWT",
|
||||
"schema": {
|
||||
"$ref": "#\/definitions\/jwt"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "getJWT",
|
||||
"group": "tokens",
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get-j-w-t.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "File token ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>",
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
@@ -8380,31 +7942,6 @@
|
||||
"files"
|
||||
]
|
||||
},
|
||||
"resourceTokenList": {
|
||||
"description": "Resource Tokens List",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"description": "Total number of tokens documents that matched your query.",
|
||||
"x-example": 5,
|
||||
"format": "int32"
|
||||
},
|
||||
"tokens": {
|
||||
"type": "array",
|
||||
"description": "List of tokens.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#\/definitions\/resourceToken"
|
||||
},
|
||||
"x-example": ""
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"total",
|
||||
"tokens"
|
||||
]
|
||||
},
|
||||
"teamList": {
|
||||
"description": "Teams List",
|
||||
"type": "object",
|
||||
@@ -9612,61 +9149,6 @@
|
||||
"chunksUploaded"
|
||||
]
|
||||
},
|
||||
"resourceToken": {
|
||||
"description": "ResourceToken",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$id": {
|
||||
"type": "string",
|
||||
"description": "Token ID.",
|
||||
"x-example": "bb8ea5c16897e"
|
||||
},
|
||||
"$createdAt": {
|
||||
"type": "string",
|
||||
"description": "Token creation date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"$permissions": {
|
||||
"type": "array",
|
||||
"description": "Token permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": [
|
||||
"read(\"any\")"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "Resource ID.",
|
||||
"x-example": "5e5ea5c168bb8:5e5ea5c168bb8"
|
||||
},
|
||||
"resourceType": {
|
||||
"type": "string",
|
||||
"description": "Resource type.",
|
||||
"x-example": "files"
|
||||
},
|
||||
"expire": {
|
||||
"type": "string",
|
||||
"description": "Token expiration date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"accessedAt": {
|
||||
"type": "string",
|
||||
"description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"$id",
|
||||
"$createdAt",
|
||||
"$permissions",
|
||||
"resourceId",
|
||||
"resourceType",
|
||||
"expire",
|
||||
"accessedAt"
|
||||
]
|
||||
},
|
||||
"team": {
|
||||
"description": "Team",
|
||||
"type": "object",
|
||||
|
||||
@@ -3551,12 +3551,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -3682,12 +3682,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -4232,12 +4232,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -8179,26 +8179,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
@@ -9068,6 +9048,15 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Length of index. Maximum of 100",
|
||||
"default": [],
|
||||
"x-example": null,
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -25998,6 +25987,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -26644,6 +26634,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -29283,6 +29274,15 @@
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -29398,12 +29398,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
@@ -29481,6 +29481,15 @@
|
||||
"x-enum-keys": [],
|
||||
"default": "",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -29551,6 +29560,15 @@
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -30815,7 +30833,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "list",
|
||||
"group": "files",
|
||||
"weight": 439,
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -30826,8 +30844,7 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -30838,8 +30855,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -30885,7 +30901,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -30902,14 +30918,13 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -30920,8 +30935,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -30953,15 +30967,6 @@
|
||||
"default": null,
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"default": [],
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31003,8 +31008,7 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -31015,8 +31019,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -31042,7 +31045,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
@@ -31054,19 +31057,18 @@
|
||||
"x-appwrite": {
|
||||
"method": "update",
|
||||
"group": "tokens",
|
||||
"weight": 440,
|
||||
"weight": 439,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/update.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -31077,8 +31079,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -31102,15 +31103,6 @@
|
||||
"default": null,
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"default": null,
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31136,7 +31128,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "delete",
|
||||
"group": "tokens",
|
||||
"weight": 441,
|
||||
"weight": 440,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -31147,8 +31139,7 @@
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
@@ -31159,8 +31150,7 @@
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -31175,68 +31165,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}\/jwt": {
|
||||
"get": {
|
||||
"summary": "Get token as JWT",
|
||||
"operationId": "tokensGetJWT",
|
||||
"consumes": [],
|
||||
"produces": [
|
||||
"application\/json"
|
||||
],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "JWT",
|
||||
"schema": {
|
||||
"$ref": "#\/definitions\/jwt"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "getJWT",
|
||||
"group": "tokens",
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get-j-w-t.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "File token ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>",
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/users": {
|
||||
"get": {
|
||||
"summary": "List users",
|
||||
@@ -37464,6 +37392,15 @@
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Index attributes length.",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"description": "Index orders.",
|
||||
@@ -37490,6 +37427,7 @@
|
||||
"status",
|
||||
"error",
|
||||
"attributes",
|
||||
"lengths",
|
||||
"$createdAt",
|
||||
"$updatedAt"
|
||||
]
|
||||
@@ -38582,16 +38520,6 @@
|
||||
"description": "Token creation date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"$permissions": {
|
||||
"type": "array",
|
||||
"description": "Token permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": [
|
||||
"read(\"any\")"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "Resource ID.",
|
||||
@@ -38607,6 +38535,11 @@
|
||||
"description": "Token expiration date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string",
|
||||
"description": "JWT encoded string.",
|
||||
"x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
|
||||
},
|
||||
"accessedAt": {
|
||||
"type": "string",
|
||||
"description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.",
|
||||
@@ -38616,10 +38549,10 @@
|
||||
"required": [
|
||||
"$id",
|
||||
"$createdAt",
|
||||
"$permissions",
|
||||
"resourceId",
|
||||
"resourceType",
|
||||
"expire",
|
||||
"secret",
|
||||
"accessedAt"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -3223,12 +3223,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -3356,12 +3356,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -3910,12 +3910,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
@@ -7644,26 +7644,6 @@
|
||||
}
|
||||
],
|
||||
"description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
},
|
||||
{
|
||||
"name": "createDocuments",
|
||||
"parameters": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documents"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
"code": 201,
|
||||
"model": "#\/definitions\/documentList"
|
||||
}
|
||||
],
|
||||
"description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console."
|
||||
}
|
||||
],
|
||||
"auth": {
|
||||
@@ -8460,6 +8440,15 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Length of index. Maximum of 100",
|
||||
"default": [],
|
||||
"x-example": null,
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -17579,6 +17568,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -18007,6 +17997,7 @@
|
||||
"remix",
|
||||
"lynx",
|
||||
"flutter",
|
||||
"react-native",
|
||||
"vite",
|
||||
"other"
|
||||
],
|
||||
@@ -20604,6 +20595,15 @@
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -20721,12 +20721,12 @@
|
||||
},
|
||||
{
|
||||
"name": "quality",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to 100.",
|
||||
"description": "Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.",
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"x-example": 0,
|
||||
"default": 100,
|
||||
"x-example": -1,
|
||||
"default": -1,
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
@@ -20804,6 +20804,15 @@
|
||||
"x-enum-keys": [],
|
||||
"default": "",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -20876,6 +20885,15 @@
|
||||
"type": "string",
|
||||
"x-example": "<FILE_ID>",
|
||||
"in": "path"
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"description": "File token for accessing this file.",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN>",
|
||||
"default": "",
|
||||
"in": "query"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -21948,7 +21966,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "list",
|
||||
"group": "files",
|
||||
"weight": 439,
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -21959,22 +21977,19 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -22020,7 +22035,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Create a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"description": "Create a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "ResourceToken",
|
||||
@@ -22037,28 +22052,25 @@
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/create-file-token.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file or a bucket and manages permissions for those file(s). Token can be passed as a header or request get parameter.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterCreate a new token. A token is linked to a file. Token can be passed as a header or request get parameter.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -22090,15 +22102,6 @@
|
||||
"default": null,
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"default": [],
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22140,22 +22143,19 @@
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -22181,7 +22181,7 @@
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"description": "Update a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "ResourceToken",
|
||||
@@ -22193,33 +22193,30 @@
|
||||
"x-appwrite": {
|
||||
"method": "update",
|
||||
"group": "tokens",
|
||||
"weight": 440,
|
||||
"weight": 439,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/update.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date or permissions.",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterUpdate a token by its unique ID. Use this endpoint to update a token's expiry date.",
|
||||
"rate-limit": 60,
|
||||
"rate-time": 60,
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -22243,15 +22240,6 @@
|
||||
"default": null,
|
||||
"x-example": null,
|
||||
"x-nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
"description": "An array of permission string. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"default": null,
|
||||
"x-example": "[\"read(\"any\")\"]",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22277,7 +22265,7 @@
|
||||
"x-appwrite": {
|
||||
"method": "delete",
|
||||
"group": "tokens",
|
||||
"weight": 441,
|
||||
"weight": 440,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
@@ -22288,22 +22276,19 @@
|
||||
"rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}",
|
||||
"scope": "tokens.write",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"console",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
"Key": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
"Key": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
@@ -22318,70 +22303,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/tokens\/{tokenId}\/jwt": {
|
||||
"get": {
|
||||
"summary": "Get token as JWT",
|
||||
"operationId": "tokensGetJWT",
|
||||
"consumes": [],
|
||||
"produces": [
|
||||
"application\/json"
|
||||
],
|
||||
"tags": [
|
||||
"tokens"
|
||||
],
|
||||
"description": "Get a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "JWT",
|
||||
"schema": {
|
||||
"$ref": "#\/definitions\/jwt"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-appwrite": {
|
||||
"method": "getJWT",
|
||||
"group": "tokens",
|
||||
"weight": 438,
|
||||
"cookies": false,
|
||||
"type": "",
|
||||
"deprecated": false,
|
||||
"demo": "tokens\/get-j-w-t.md",
|
||||
"edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/masterGet a JWT based token by its unique ID. You can use the JWT to authenticate on behalf of the user.",
|
||||
"rate-limit": 0,
|
||||
"rate-time": 3600,
|
||||
"rate-key": "url:{url},ip:{ip}",
|
||||
"scope": "tokens.read",
|
||||
"platforms": [
|
||||
"client",
|
||||
"server",
|
||||
"server"
|
||||
],
|
||||
"packaging": false,
|
||||
"auth": {
|
||||
"Project": [],
|
||||
"Session": []
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Project": [],
|
||||
"Session": [],
|
||||
"Key": [],
|
||||
"JWT": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tokenId",
|
||||
"description": "File token ID.",
|
||||
"required": true,
|
||||
"type": "string",
|
||||
"x-example": "<TOKEN_ID>",
|
||||
"in": "path"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"\/users": {
|
||||
"get": {
|
||||
"summary": "List users",
|
||||
@@ -27498,6 +27419,15 @@
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"lengths": {
|
||||
"type": "array",
|
||||
"description": "Index attributes length.",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"x-example": []
|
||||
},
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"description": "Index orders.",
|
||||
@@ -27524,6 +27454,7 @@
|
||||
"status",
|
||||
"error",
|
||||
"attributes",
|
||||
"lengths",
|
||||
"$createdAt",
|
||||
"$updatedAt"
|
||||
]
|
||||
@@ -28616,16 +28547,6 @@
|
||||
"description": "Token creation date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"$permissions": {
|
||||
"type": "array",
|
||||
"description": "Token permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-example": [
|
||||
"read(\"any\")"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "Resource ID.",
|
||||
@@ -28641,6 +28562,11 @@
|
||||
"description": "Token expiration date in ISO 8601 format.",
|
||||
"x-example": "2020-10-15T06:38:00.000+00:00"
|
||||
},
|
||||
"secret": {
|
||||
"type": "string",
|
||||
"description": "JWT encoded string.",
|
||||
"x-example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
|
||||
},
|
||||
"accessedAt": {
|
||||
"type": "string",
|
||||
"description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.",
|
||||
@@ -28650,10 +28576,10 @@
|
||||
"required": [
|
||||
"$id",
|
||||
"$createdAt",
|
||||
"$permissions",
|
||||
"resourceId",
|
||||
"resourceType",
|
||||
"expire",
|
||||
"secret",
|
||||
"accessedAt"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -106,6 +106,16 @@ const TEMPLATE_FRAMEWORKS = [
|
||||
'outputDirectory' => './dist',
|
||||
'fallbackFile' => 'index.html',
|
||||
],
|
||||
'REACT_NATIVE' => [
|
||||
'key' => 'react-native',
|
||||
'name' => 'React Native',
|
||||
'installCommand' => 'npm install',
|
||||
'buildCommand' => 'npm run build',
|
||||
'buildRuntime' => 'node-22',
|
||||
'adapter' => 'static',
|
||||
'outputDirectory' => './dist',
|
||||
'fallbackFile' => '+not-found.html',
|
||||
],
|
||||
'ANGULAR' => [
|
||||
'key' => 'angular',
|
||||
'name' => 'Angular',
|
||||
@@ -866,9 +876,8 @@ return [
|
||||
'screenshotDark' => $url . '/images/sites/templates/starter-for-react-native-dark.png',
|
||||
'screenshotLight' => $url . '/images/sites/templates/starter-for-react-native-light.png',
|
||||
'frameworks' => [
|
||||
getFramework('REACT', [
|
||||
getFramework('REACT_NATIVE', [
|
||||
'providerRootDirectory' => './',
|
||||
'fallbackFile' => '+not-found.html',
|
||||
]),
|
||||
],
|
||||
'vcsProvider' => 'github',
|
||||
@@ -1332,7 +1341,7 @@ return [
|
||||
'screenshotDark' => $url . '/images/sites/templates/playground-for-react-native-dark.png',
|
||||
'screenshotLight' => $url . '/images/sites/templates/playground-for-react-native-light.png',
|
||||
'frameworks' => [
|
||||
getFramework('REACT', [
|
||||
getFramework('REACT_NATIVE', [
|
||||
'providerRootDirectory' => './react-native/starter',
|
||||
]),
|
||||
],
|
||||
|
||||
@@ -187,7 +187,7 @@ App::get('/v1/avatars/credit-cards/:code')
|
||||
->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-credit-cards'))), 'Credit Card Code. Possible values: ' . \implode(', ', \array_keys(Config::getParam('avatar-credit-cards'))) . '.')
|
||||
->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true)
|
||||
->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true)
|
||||
->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
|
||||
->param('quality', -1, new Range(-1, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
|
||||
->inject('response')
|
||||
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('credit-cards', $code, $width, $height, $quality, $response));
|
||||
|
||||
@@ -215,7 +215,7 @@ App::get('/v1/avatars/browsers/:code')
|
||||
->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-browsers'))), 'Browser Code.')
|
||||
->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true)
|
||||
->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true)
|
||||
->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
|
||||
->param('quality', -1, new Range(-1, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
|
||||
->inject('response')
|
||||
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('browsers', $code, $width, $height, $quality, $response));
|
||||
|
||||
@@ -243,7 +243,7 @@ App::get('/v1/avatars/flags/:code')
|
||||
->param('code', '', new WhiteList(\array_keys(Config::getParam('avatar-flags'))), 'Country Code. ISO Alpha-2 country code format.')
|
||||
->param('width', 100, new Range(0, 2000), 'Image width. Pass an integer between 0 to 2000. Defaults to 100.', true)
|
||||
->param('height', 100, new Range(0, 2000), 'Image height. Pass an integer between 0 to 2000. Defaults to 100.', true)
|
||||
->param('quality', 100, new Range(0, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
|
||||
->param('quality', -1, new Range(-1, 100), 'Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
|
||||
->inject('response')
|
||||
->action(fn (string $code, int $width, int $height, int $quality, Response $response) => $avatarCallback('flags', $code, $width, $height, $quality, $response));
|
||||
|
||||
|
||||
@@ -2813,11 +2813,12 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
||||
->param('type', null, new WhiteList([Database::INDEX_KEY, Database::INDEX_FULLTEXT, Database::INDEX_UNIQUE]), 'Index type.')
|
||||
->param('attributes', null, new ArrayList(new Key(true), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of attributes to index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' attributes are allowed, each 32 characters long.')
|
||||
->param('orders', [], new ArrayList(new WhiteList(['ASC', 'DESC'], false, Database::VAR_STRING), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of index orders. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' orders are allowed.', true)
|
||||
->param('lengths', [], new ArrayList(new Nullable(new Integer()), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Length of index. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE, optional:true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForDatabase')
|
||||
->inject('queueForEvents')
|
||||
->action(function (string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) {
|
||||
->action(function (string $databaseId, string $collectionId, string $key, string $type, array $attributes, array $orders, array $lengths, Response $response, Database $dbForProject, EventDatabase $queueForDatabase, Event $queueForEvents) {
|
||||
|
||||
$db = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId));
|
||||
|
||||
@@ -2877,9 +2878,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
||||
'size' => 0
|
||||
];
|
||||
|
||||
// lengths hidden by default
|
||||
$lengths = [];
|
||||
|
||||
foreach ($attributes as $i => $attribute) {
|
||||
// find attribute metadata in collection document
|
||||
$attributeIndex = \array_search($attribute, array_column($oldAttributes, 'key'));
|
||||
@@ -2901,8 +2899,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/indexes')
|
||||
throw new Exception(Exception::ATTRIBUTE_NOT_AVAILABLE, 'Attribute not available: ' . $oldAttributes[$attributeIndex]['key']);
|
||||
}
|
||||
|
||||
$lengths[$i] = null;
|
||||
|
||||
$lengths[$i] ??= null;
|
||||
if ($attributeArray === true) {
|
||||
$lengths[$i] = Database::ARRAY_INDEX_LENGTH;
|
||||
$orders[$i] = null;
|
||||
@@ -3204,25 +3201,25 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||
new Parameter('permissions', optional: true),
|
||||
]
|
||||
),
|
||||
new Method(
|
||||
namespace: 'databases',
|
||||
group: 'documents',
|
||||
name: 'createDocuments',
|
||||
description: '/docs/references/databases/create-documents.md',
|
||||
auth: [AuthType::KEY],
|
||||
responses: [
|
||||
new SDKResponse(
|
||||
code: Response::STATUS_CODE_CREATED,
|
||||
model: Response::MODEL_DOCUMENT_LIST,
|
||||
)
|
||||
],
|
||||
contentType: ContentType::JSON,
|
||||
parameters: [
|
||||
new Parameter('databaseId', optional: false),
|
||||
new Parameter('collectionId', optional: false),
|
||||
new Parameter('documents', optional: false),
|
||||
]
|
||||
)
|
||||
// new Method(
|
||||
// namespace: 'databases',
|
||||
// group: 'documents',
|
||||
// name: 'createDocuments',
|
||||
// description: '/docs/references/databases/create-documents.md',
|
||||
// auth: [AuthType::KEY],
|
||||
// responses: [
|
||||
// new SDKResponse(
|
||||
// code: Response::STATUS_CODE_CREATED,
|
||||
// model: Response::MODEL_DOCUMENT_LIST,
|
||||
// )
|
||||
// ],
|
||||
// contentType: ContentType::JSON,
|
||||
// parameters: [
|
||||
// new Parameter('databaseId', optional: false),
|
||||
// new Parameter('collectionId', optional: false),
|
||||
// new Parameter('documents', optional: false),
|
||||
// ]
|
||||
// )
|
||||
]
|
||||
)
|
||||
->param('databaseId', '', new UID(), 'Database ID.')
|
||||
@@ -4742,8 +4739,8 @@ App::get('/v1/databases/:databaseId/usage')
|
||||
str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_COLLECTIONS),
|
||||
str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_DOCUMENTS),
|
||||
str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_STORAGE),
|
||||
str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_READS),
|
||||
str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASES_OPERATIONS_WRITES)
|
||||
str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_READS),
|
||||
str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES)
|
||||
];
|
||||
|
||||
Authorization::skip(function () use ($dbForProject, $days, $metrics, &$stats) {
|
||||
|
||||
@@ -2139,7 +2139,8 @@ App::post('/v1/projects/:projectId/smtp/tests')
|
||||
->inject('response')
|
||||
->inject('dbForPlatform')
|
||||
->inject('queueForMails')
|
||||
->action(function (string $projectId, array $emails, string $senderName, string $senderEmail, string $replyTo, string $host, int $port, string $username, string $password, string $secure, Response $response, Database $dbForPlatform, Mail $queueForMails) {
|
||||
->inject('plan')
|
||||
->action(function (string $projectId, array $emails, string $senderName, string $senderEmail, string $replyTo, string $host, int $port, string $username, string $password, string $secure, Response $response, Database $dbForPlatform, Mail $queueForMails, array $plan) {
|
||||
$project = $dbForPlatform->getDocument('projects', $projectId);
|
||||
|
||||
if ($project->isEmpty()) {
|
||||
@@ -2152,7 +2153,14 @@ App::post('/v1/projects/:projectId/smtp/tests')
|
||||
$template = Template::fromFile(__DIR__ . '/../../config/locale/templates/email-smtp-test.tpl');
|
||||
$template
|
||||
->setParam('{{from}}', "{$senderName} ({$senderEmail})")
|
||||
->setParam('{{replyTo}}', "{$senderName} ({$replyToEmail})");
|
||||
->setParam('{{replyTo}}', "{$senderName} ({$replyToEmail})")
|
||||
->setParam('{{logoUrl}}', $plan['logoUrl'] ?? APP_EMAIL_LOGO_URL)
|
||||
->setParam('{{accentColor}}', $plan['accentColor'] ?? APP_EMAIL_ACCENT_COLOR)
|
||||
->setParam('{{twitterUrl}}', $plan['twitterUrl'] ?? APP_SOCIAL_TWITTER)
|
||||
->setParam('{{discordUrl}}', $plan['discordUrl'] ?? APP_SOCIAL_DISCORD)
|
||||
->setParam('{{githubUrl}}', $plan['githubUrl'] ?? APP_SOCIAL_GITHUB_APPWRITE)
|
||||
->setParam('{{termsUrl}}', $plan['termsUrl'] ?? APP_EMAIL_TERMS_URL)
|
||||
->setParam('{{privacyUrl}}', $plan['privacyUrl'] ?? APP_EMAIL_PRIVACY_URL);
|
||||
|
||||
foreach ($emails as $email) {
|
||||
$queueForMails
|
||||
|
||||
@@ -943,7 +943,7 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
|
||||
->param('width', 0, new Range(0, 4000), 'Resize preview image width, Pass an integer between 0 to 4000.', true)
|
||||
->param('height', 0, new Range(0, 4000), 'Resize preview image height, Pass an integer between 0 to 4000.', true)
|
||||
->param('gravity', Image::GRAVITY_CENTER, new WhiteList(Image::getGravityTypes()), 'Image crop gravity. Can be one of ' . implode(",", Image::getGravityTypes()), true)
|
||||
->param('quality', 100, new Range(0, 100), 'Preview image quality. Pass an integer between 0 to 100. Defaults to 100.', true)
|
||||
->param('quality', -1, new Range(-1, 100), 'Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.', true)
|
||||
->param('borderWidth', 0, new Range(0, 100), 'Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.', true)
|
||||
->param('borderColor', '', new HexColor(), 'Preview image border color. Use a valid HEX color, no # is needed for prefix.', true)
|
||||
->param('borderRadius', 0, new Range(0, 4000), 'Preview image border radius in pixels. Pass an integer between 0 to 4000.', true)
|
||||
@@ -951,12 +951,14 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/preview')
|
||||
->param('rotation', 0, new Range(-360, 360), 'Preview image rotation in degrees. Pass an integer between -360 and 360.', true)
|
||||
->param('background', '', new HexColor(), 'Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.', true)
|
||||
->param('output', '', new WhiteList(\array_keys(Config::getParam('storage-outputs')), true), 'Output format type (jpeg, jpg, png, gif and webp).', true)
|
||||
// NOTE: this is only for the sdk generator and is not used in the action below and is utilised in `resources.php` for `resourceToken`.
|
||||
->param('token', '', new Text(512), 'File token for accessing this file.', true)
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('resourceToken')
|
||||
->inject('deviceForFiles')
|
||||
->inject('deviceForLocal')
|
||||
->action(function (string $bucketId, string $fileId, int $width, int $height, string $gravity, int $quality, int $borderWidth, string $borderColor, int $borderRadius, float $opacity, int $rotation, string $background, string $output, Response $response, Database $dbForProject, Document $resourceToken, Device $deviceForFiles, Device $deviceForLocal) {
|
||||
->action(function (string $bucketId, string $fileId, int $width, int $height, string $gravity, int $quality, int $borderWidth, string $borderColor, int $borderRadius, float $opacity, int $rotation, string $background, string $output, ?string $token, Response $response, Database $dbForProject, Document $resourceToken, Device $deviceForFiles, Device $deviceForLocal) {
|
||||
|
||||
if (!\extension_loaded('imagick')) {
|
||||
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Imagick extension is missing');
|
||||
@@ -1129,13 +1131,15 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/download')
|
||||
))
|
||||
->param('bucketId', '', new UID(), 'Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).')
|
||||
->param('fileId', '', new UID(), 'File ID.')
|
||||
// NOTE: this is only for the sdk generator and is not used in the action below and is utilised in `resources.php` for `resourceToken`.
|
||||
->param('token', '', new Text(512), 'File token for accessing this file.', true)
|
||||
->inject('request')
|
||||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('mode')
|
||||
->inject('resourceToken')
|
||||
->inject('deviceForFiles')
|
||||
->action(function (string $bucketId, string $fileId, Request $request, Response $response, Database $dbForProject, string $mode, Document $resourceToken, Device $deviceForFiles) {
|
||||
->action(function (string $bucketId, string $fileId, ?string $token, Request $request, Response $response, Database $dbForProject, string $mode, Document $resourceToken, Device $deviceForFiles) {
|
||||
|
||||
$bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId));
|
||||
|
||||
@@ -1284,13 +1288,15 @@ App::get('/v1/storage/buckets/:bucketId/files/:fileId/view')
|
||||
))
|
||||
->param('bucketId', '', new UID(), 'Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).')
|
||||
->param('fileId', '', new UID(), 'File ID.')
|
||||
// NOTE: this is only for the sdk generator and is not used in the action below and is utilised in `resources.php` for `resourceToken`.
|
||||
->param('token', '', new Text(512), 'File token for accessing this file.', true)
|
||||
->inject('response')
|
||||
->inject('request')
|
||||
->inject('dbForProject')
|
||||
->inject('mode')
|
||||
->inject('resourceToken')
|
||||
->inject('deviceForFiles')
|
||||
->action(function (string $bucketId, string $fileId, Response $response, Request $request, Database $dbForProject, string $mode, Document $resourceToken, Device $deviceForFiles) {
|
||||
->action(function (string $bucketId, string $fileId, ?string $token, Response $response, Request $request, Database $dbForProject, string $mode, Document $resourceToken, Device $deviceForFiles) {
|
||||
$bucket = Authorization::skip(fn () => $dbForProject->getDocument('buckets', $bucketId));
|
||||
|
||||
$isAPIKey = Auth::isAppUser(Authorization::getRoles());
|
||||
|
||||
@@ -1090,7 +1090,10 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId')
|
||||
// Quick check: fetch up to 2 owners to determine if only one exists
|
||||
$ownersCount = $dbForProject->count(
|
||||
collection: 'memberships',
|
||||
queries: [Query::contains('roles', ['owner'])],
|
||||
queries: [
|
||||
Query::contains('roles', ['owner']),
|
||||
Query::equal('teamInternalId', [$team->getInternalId()])
|
||||
],
|
||||
max: 2
|
||||
);
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@ const APP_NAME = 'Appwrite';
|
||||
const APP_DOMAIN = 'appwrite.io';
|
||||
const APP_EMAIL_TEAM = 'team@localhost.test'; // Default email address
|
||||
const APP_EMAIL_SECURITY = ''; // Default security email address
|
||||
const APP_EMAIL_LOGO_URL = 'https://cloud.appwrite.io/images/mails/logo.png';
|
||||
const APP_EMAIL_ACCENT_COLOR = '#fd366e';
|
||||
const APP_EMAIL_TERMS_URL = 'https://appwrite.io/terms';
|
||||
const APP_EMAIL_PRIVACY_URL = 'https://appwrite.io/privacy';
|
||||
const APP_USERAGENT = APP_NAME . '-Server v%s. Please report abuse at %s';
|
||||
const APP_MODE_DEFAULT = 'default';
|
||||
const APP_MODE_ADMIN = 'admin';
|
||||
@@ -62,6 +66,7 @@ const APP_SOCIAL_FACEBOOK = 'https://www.facebook.com/appwrite.io';
|
||||
const APP_SOCIAL_LINKEDIN = 'https://www.linkedin.com/company/appwrite';
|
||||
const APP_SOCIAL_INSTAGRAM = 'https://www.instagram.com/appwrite.io';
|
||||
const APP_SOCIAL_GITHUB = 'https://github.com/appwrite';
|
||||
const APP_SOCIAL_GITHUB_APPWRITE = 'https://github.com/appwrite/appwrite';
|
||||
const APP_SOCIAL_DISCORD = 'https://appwrite.io/discord';
|
||||
const APP_SOCIAL_DISCORD_CHANNEL = '564160730845151244';
|
||||
const APP_SOCIAL_DEV = 'https://dev.to/appwrite';
|
||||
|
||||
+52
-41
@@ -509,29 +509,26 @@ App::setResource('timelimit', function (\Redis $redis) {
|
||||
};
|
||||
}, ['redis']);
|
||||
|
||||
App::setResource('deviceForLocal', function () {
|
||||
return new Local();
|
||||
});
|
||||
App::setResource('deviceForLocal', function (Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, new Local());
|
||||
}, ['telemetry']);
|
||||
|
||||
App::setResource('deviceForFiles', function ($project) {
|
||||
return getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
App::setResource('deviceForFiles', function ($project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
App::setResource('deviceForSites', function ($project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_SITES . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
App::setResource('deviceForImports', function ($project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
App::setResource('deviceForFunctions', function ($project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
App::setResource('deviceForSites', function ($project) {
|
||||
return getDevice(APP_STORAGE_SITES . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
|
||||
App::setResource('deviceForImports', function (Document $project) {
|
||||
return getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
|
||||
App::setResource('deviceForFunctions', function ($project) {
|
||||
return getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
|
||||
App::setResource('deviceForBuilds', function ($project) {
|
||||
return getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
App::setResource('deviceForBuilds', function ($project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
function getDevice(string $root, string $connection = ''): Device
|
||||
{
|
||||
@@ -918,38 +915,52 @@ App::setResource('resourceToken', function ($project, $dbForProject, $request) {
|
||||
}
|
||||
|
||||
$tokenId = $payload['tokenId'] ?? '';
|
||||
$secret = $payload['secret'] ?? '';
|
||||
if (empty($tokenId) || empty($secret)) {
|
||||
if (empty($tokenId)) {
|
||||
return new Document([]);
|
||||
}
|
||||
|
||||
$token = Authorization::skip(fn () => $dbForProject->getDocument('resourceTokens', $tokenId));
|
||||
|
||||
if ($token->isEmpty() || $token->getAttribute('secret') !== $secret) {
|
||||
if ($token->isEmpty()) {
|
||||
return new Document([]);
|
||||
}
|
||||
|
||||
if ($token->getAttribute('resourceType') === TOKENS_RESOURCE_TYPE_FILES) {
|
||||
$internalIds = explode(':', $token->getAttribute('resourceInternalId'));
|
||||
$ids = explode(':', $token->getAttribute('resourceId'));
|
||||
$expiry = $token->getAttribute('expire');
|
||||
|
||||
if (count($internalIds) !== 2 || count($ids) !== 2) {
|
||||
if ($expiry !== null) {
|
||||
$now = new \DateTime();
|
||||
$expiryDate = new \DateTime($expiry);
|
||||
|
||||
if ($expiryDate < $now) {
|
||||
return new Document([]);
|
||||
}
|
||||
|
||||
$accessedAt = $token->getAttribute('accessedAt', 0);
|
||||
if (empty($accessedAt) || DatabaseDateTime::formatTz(DatabaseDateTime::addSeconds(new \DateTime(), - APP_RESOURCE_TOKEN_ACCESS)) > $accessedAt) {
|
||||
$token->setAttribute('accessedAt', DatabaseDateTime::now());
|
||||
Authorization::skip(fn () => $dbForProject->updateDocument('resourceTokens', $token->getId(), $token));
|
||||
}
|
||||
|
||||
return new Document([
|
||||
'bucketId' => $ids[0],
|
||||
'fileId' => $ids[1],
|
||||
'bucketInternalId' => $internalIds[0],
|
||||
'fileInternalId' => $internalIds[1],
|
||||
]);
|
||||
}
|
||||
|
||||
return match ($token->getAttribute('resourceType')) {
|
||||
TOKENS_RESOURCE_TYPE_FILES => (function () use ($token, $dbForProject) {
|
||||
$internalIds = explode(':', $token->getAttribute('resourceInternalId'));
|
||||
$ids = explode(':', $token->getAttribute('resourceId'));
|
||||
|
||||
if (count($internalIds) !== 2 || count($ids) !== 2) {
|
||||
return new Document([]);
|
||||
}
|
||||
|
||||
$accessedAt = $token->getAttribute('accessedAt', 0);
|
||||
if (empty($accessedAt) || DatabaseDateTime::formatTz(DatabaseDateTime::addSeconds(new \DateTime(), - APP_RESOURCE_TOKEN_ACCESS)) > $accessedAt) {
|
||||
$token->setAttribute('accessedAt', DatabaseDateTime::now());
|
||||
Authorization::skip(fn () => $dbForProject->updateDocument('resourceTokens', $token->getId(), $token));
|
||||
}
|
||||
|
||||
return new Document([
|
||||
'bucketId' => $ids[0],
|
||||
'fileId' => $ids[1],
|
||||
'bucketInternalId' => $internalIds[0],
|
||||
'fileInternalId' => $internalIds[1],
|
||||
]);
|
||||
})(),
|
||||
|
||||
default => throw new Exception(Exception::TOKEN_RESOURCE_TYPE_INVALID),
|
||||
};
|
||||
}
|
||||
return new Document([]);
|
||||
}, ['project', 'dbForProject', 'request']);
|
||||
|
||||
+27
-18
@@ -37,7 +37,10 @@ use Utopia\Queue\Message;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Server;
|
||||
use Utopia\Registry\Registry;
|
||||
use Utopia\Storage\Device;
|
||||
use Utopia\System\System;
|
||||
use Utopia\Telemetry\Adapter as Telemetry;
|
||||
use Utopia\Telemetry\Adapter\None as NoTelemetry;
|
||||
|
||||
Authorization::disable();
|
||||
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
|
||||
@@ -334,35 +337,41 @@ Server::setResource('pools', function (Registry $register) {
|
||||
return $register->get('pools');
|
||||
}, ['register']);
|
||||
|
||||
Server::setResource('deviceForSites', function (Document $project) {
|
||||
return getDevice(APP_STORAGE_SITES . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
Server::setResource('telemetry', fn () => new NoTelemetry());
|
||||
|
||||
Server::setResource('deviceForImports', function (Document $project) {
|
||||
return getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
Server::setResource('deviceForSites', function (Document $project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_SITES . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
Server::setResource('deviceForFunctions', function (Document $project) {
|
||||
return getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
Server::setResource('deviceForImports', function (Document $project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_IMPORTS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
Server::setResource('deviceForFiles', function (Document $project) {
|
||||
return getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
Server::setResource('deviceForFunctions', function (Document $project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_FUNCTIONS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
Server::setResource('deviceForBuilds', function (Document $project) {
|
||||
return getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
Server::setResource('deviceForFiles', function (Document $project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_UPLOADS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
Server::setResource('deviceForCache', function (Document $project) {
|
||||
return getDevice(APP_STORAGE_CACHE . '/app-' . $project->getId());
|
||||
}, ['project']);
|
||||
Server::setResource('deviceForBuilds', function (Document $project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_BUILDS . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
Server::setResource('deviceForCache', function (Document $project, Telemetry $telemetry) {
|
||||
return new Device\Telemetry($telemetry, getDevice(APP_STORAGE_CACHE . '/app-' . $project->getId()));
|
||||
}, ['project', 'telemetry']);
|
||||
|
||||
Server::setResource(
|
||||
'isResourceBlocked',
|
||||
fn () => fn (Document $project, string $resourceType, ?string $resourceId) => false
|
||||
);
|
||||
|
||||
Server::setResource('plan', function (array $plan = []) {
|
||||
return [];
|
||||
});
|
||||
|
||||
Server::setResource('certificates', function () {
|
||||
$email = System::getEnv('_APP_EMAIL_CERTIFICATES', System::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS'));
|
||||
if (empty($email)) {
|
||||
|
||||
Reference in New Issue
Block a user