From 88f1fa6c6757133d04bbbc49891e46b101c079ee Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 16 May 2025 09:32:05 +0000 Subject: [PATCH] chore: update specs and examples --- app/config/specs/open-api3-1.7.x-client.json | 607 ++---------------- app/config/specs/open-api3-1.7.x-console.json | 238 +++---- app/config/specs/open-api3-1.7.x-server.json | 255 +++----- app/config/specs/swagger2-1.7.x-client.json | 596 ++--------------- app/config/specs/swagger2-1.7.x-console.json | 233 +++---- app/config/specs/swagger2-1.7.x-server.json | 250 +++----- .../java/avatars/get-browser.md | 2 +- .../java/avatars/get-credit-card.md | 2 +- .../client-android/java/avatars/get-flag.md | 2 +- .../java/storage/get-file-download.md | 1 + .../java/storage/get-file-preview.md | 3 +- .../java/storage/get-file-view.md | 1 + .../kotlin/avatars/get-browser.md | 2 +- .../kotlin/avatars/get-credit-card.md | 2 +- .../client-android/kotlin/avatars/get-flag.md | 2 +- .../kotlin/storage/get-file-download.md | 1 + .../kotlin/storage/get-file-preview.md | 3 +- .../kotlin/storage/get-file-view.md | 1 + .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../client-apple/examples/avatars/get-flag.md | 2 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/avatars/get-browser.md | 4 +- .../examples/avatars/get-credit-card.md | 4 +- .../examples/avatars/get-flag.md | 4 +- .../examples/storage/get-file-download.md | 2 + .../examples/storage/get-file-preview.md | 6 +- .../examples/storage/get-file-view.md | 2 + .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-flag.md | 2 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../client-web/examples/avatars/get-flag.md | 2 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/databases/create-index.md | 1 + .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 1 + .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 1 - .../console-cli/examples/tokens/update.md | 1 - .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../console-web/examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 3 +- .../console-web/examples/tokens/update.md | 3 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../server-dart/examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 1 + .../examples/storage/get-file-download.md | 1 + .../examples/storage/get-file-preview.md | 3 +- .../examples/storage/get-file-view.md | 1 + .../examples/tokens/create-file-token.md | 3 +- .../server-dart/examples/tokens/delete.md | 2 +- .../1.7.x/server-dart/examples/tokens/get.md | 2 +- .../1.7.x/server-dart/examples/tokens/list.md | 2 +- .../server-dart/examples/tokens/update.md | 3 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../server-deno/examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-deno/examples/tokens/delete.md | 2 +- .../1.7.x/server-deno/examples/tokens/get.md | 2 +- .../1.7.x/server-deno/examples/tokens/list.md | 2 +- .../server-deno/examples/tokens/update.md | 5 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-dotnet/examples/tokens/delete.md | 2 +- .../server-dotnet/examples/tokens/get.md | 2 +- .../server-dotnet/examples/tokens/list.md | 2 +- .../server-dotnet/examples/tokens/update.md | 5 +- .../server-go/examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../server-go/examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 1 + .../examples/storage/get-file-download.md | 1 + .../examples/storage/get-file-preview.md | 3 +- .../examples/storage/get-file-view.md | 1 + .../examples/tokens/create-file-token.md | 3 +- .../1.7.x/server-go/examples/tokens/delete.md | 2 +- .../1.7.x/server-go/examples/tokens/get.md | 2 +- .../1.7.x/server-go/examples/tokens/list.md | 2 +- .../1.7.x/server-go/examples/tokens/update.md | 3 +- .../examples/databases/create-collection.md | 1 + .../examples/databases/create-index.md | 4 +- .../examples/databases/update-collection.md | 1 + .../examples/tokens/create-file-token.md | 5 +- .../server-graphql/examples/tokens/update.md | 5 +- .../server-kotlin/java/avatars/get-browser.md | 2 +- .../java/avatars/get-credit-card.md | 2 +- .../server-kotlin/java/avatars/get-flag.md | 2 +- .../java/databases/create-index.md | 1 + .../java/storage/get-file-download.md | 1 + .../java/storage/get-file-preview.md | 3 +- .../java/storage/get-file-view.md | 1 + .../java/tokens/create-file-token.md | 3 +- .../1.7.x/server-kotlin/java/tokens/delete.md | 2 +- .../1.7.x/server-kotlin/java/tokens/get.md | 2 +- .../1.7.x/server-kotlin/java/tokens/list.md | 2 +- .../1.7.x/server-kotlin/java/tokens/update.md | 3 +- .../kotlin/avatars/get-browser.md | 2 +- .../kotlin/avatars/get-credit-card.md | 2 +- .../server-kotlin/kotlin/avatars/get-flag.md | 2 +- .../kotlin/databases/create-index.md | 3 +- .../kotlin/storage/get-file-download.md | 3 +- .../kotlin/storage/get-file-preview.md | 5 +- .../kotlin/storage/get-file-view.md | 3 +- .../kotlin/tokens/create-file-token.md | 5 +- .../server-kotlin/kotlin/tokens/delete.md | 2 +- .../1.7.x/server-kotlin/kotlin/tokens/get.md | 2 +- .../1.7.x/server-kotlin/kotlin/tokens/list.md | 2 +- .../server-kotlin/kotlin/tokens/update.md | 5 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-nodejs/examples/tokens/delete.md | 2 +- .../server-nodejs/examples/tokens/get.md | 2 +- .../server-nodejs/examples/tokens/list.md | 2 +- .../server-nodejs/examples/tokens/update.md | 5 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../server-php/examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-php/examples/tokens/delete.md | 2 +- .../1.7.x/server-php/examples/tokens/get.md | 2 +- .../1.7.x/server-php/examples/tokens/list.md | 2 +- .../server-php/examples/tokens/update.md | 5 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-python/examples/tokens/delete.md | 2 +- .../server-python/examples/tokens/get.md | 2 +- .../server-python/examples/tokens/list.md | 2 +- .../server-python/examples/tokens/update.md | 5 +- .../examples/databases/create-index.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-rest/examples/tokens/delete.md | 2 - .../1.7.x/server-rest/examples/tokens/get.md | 2 - .../1.7.x/server-rest/examples/tokens/list.md | 2 - .../server-rest/examples/tokens/update.md | 5 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../server-ruby/examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-ruby/examples/tokens/delete.md | 2 +- .../1.7.x/server-ruby/examples/tokens/get.md | 2 +- .../1.7.x/server-ruby/examples/tokens/list.md | 2 +- .../server-ruby/examples/tokens/update.md | 5 +- .../examples/avatars/get-browser.md | 2 +- .../examples/avatars/get-credit-card.md | 2 +- .../server-swift/examples/avatars/get-flag.md | 2 +- .../examples/databases/create-index.md | 3 +- .../examples/storage/get-file-download.md | 3 +- .../examples/storage/get-file-preview.md | 5 +- .../examples/storage/get-file-view.md | 3 +- .../examples/tokens/create-file-token.md | 5 +- .../server-swift/examples/tokens/delete.md | 2 +- .../1.7.x/server-swift/examples/tokens/get.md | 2 +- .../server-swift/examples/tokens/list.md | 2 +- .../server-swift/examples/tokens/update.md | 5 +- 200 files changed, 718 insertions(+), 1987 deletions(-) diff --git a/app/config/specs/open-api3-1.7.x-client.json b/app/config/specs/open-api3-1.7.x-client.json index 2b568cbe4a..86e7f18bc2 100644 --- a/app/config/specs/open-api3-1.7.x-client.json +++ b/app/config/specs/open-api3-1.7.x-client.json @@ -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": "" }, "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "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": "", + "default": "" + }, + "in": "query" } ] } @@ -6565,6 +6567,17 @@ "x-example": "" }, "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "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": "" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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": "" - }, - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "schema": { - "type": "string", - "x-example": "" - }, - "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": "" - }, - "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": "" - }, - "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": "" - }, - "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": "" - }, - "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", diff --git a/app/config/specs/open-api3-1.7.x-console.json b/app/config/specs/open-api3-1.7.x-console.json index 8e133123c5..b52f79b189 100644 --- a/app/config/specs/open-api3-1.7.x-console.json +++ b/app/config/specs/open-api3-1.7.x-console.json @@ -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": "" }, "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "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": "", + "default": "" + }, + "in": "query" } ] } @@ -29298,6 +29310,17 @@ "x-example": "" }, "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "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": "" - }, - "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" ] }, diff --git a/app/config/specs/open-api3-1.7.x-server.json b/app/config/specs/open-api3-1.7.x-server.json index a21b74333c..44b9c4be42 100644 --- a/app/config/specs/open-api3-1.7.x-server.json +++ b/app/config/specs/open-api3-1.7.x-server.json @@ -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": "" }, "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "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": "", + "default": "" + }, + "in": "query" } ] } @@ -20580,6 +20592,17 @@ "x-example": "" }, "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "schema": { + "type": "string", + "x-example": "", + "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": "" - }, - "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" ] }, diff --git a/app/config/specs/swagger2-1.7.x-client.json b/app/config/specs/swagger2-1.7.x-client.json index 01ad2fbb32..d421c45ccc 100644 --- a/app/config/specs/swagger2-1.7.x-client.json +++ b/app/config/specs/swagger2-1.7.x-client.json @@ -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": "", "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "", + "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": "", + "default": "", + "in": "query" } ] } @@ -6707,6 +6705,15 @@ "type": "string", "x-example": "", "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "", + "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": "", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "", - "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": "", - "in": "path" - }, - { - "name": "fileId", - "description": "File unique ID.", - "required": true, - "type": "string", - "x-example": "", - "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": "", - "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": "", - "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": "", - "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": "", - "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", diff --git a/app/config/specs/swagger2-1.7.x-console.json b/app/config/specs/swagger2-1.7.x-console.json index b97af97d74..d5cf96ed8f 100644 --- a/app/config/specs/swagger2-1.7.x-console.json +++ b/app/config/specs/swagger2-1.7.x-console.json @@ -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": "", "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "", + "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": "", + "default": "", + "in": "query" } ] } @@ -29551,6 +29560,15 @@ "type": "string", "x-example": "", "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "", + "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": "", - "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" ] }, diff --git a/app/config/specs/swagger2-1.7.x-server.json b/app/config/specs/swagger2-1.7.x-server.json index 7e950f956b..554a8579a6 100644 --- a/app/config/specs/swagger2-1.7.x-server.json +++ b/app/config/specs/swagger2-1.7.x-server.json @@ -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": "", "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "", + "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": "", + "default": "", + "in": "query" } ] } @@ -20876,6 +20885,15 @@ "type": "string", "x-example": "", "in": "path" + }, + { + "name": "token", + "description": "File token for accessing this file.", + "required": false, + "type": "string", + "x-example": "", + "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": "", - "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" ] }, diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-browser.md b/docs/examples/1.7.x/client-android/java/avatars/get-browser.md index 4c8579649e..1b6632f30a 100644 --- a/docs/examples/1.7.x/client-android/java/avatars/get-browser.md +++ b/docs/examples/1.7.x/client-android/java/avatars/get-browser.md @@ -13,7 +13,7 @@ avatars.getBrowser( Browser.AVANT_BROWSER, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-credit-card.md b/docs/examples/1.7.x/client-android/java/avatars/get-credit-card.md index a8bc30308f..e2ac2c26cd 100644 --- a/docs/examples/1.7.x/client-android/java/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/client-android/java/avatars/get-credit-card.md @@ -13,7 +13,7 @@ avatars.getCreditCard( CreditCard.AMERICAN_EXPRESS, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/client-android/java/avatars/get-flag.md b/docs/examples/1.7.x/client-android/java/avatars/get-flag.md index 61ced3b604..689e27fe35 100644 --- a/docs/examples/1.7.x/client-android/java/avatars/get-flag.md +++ b/docs/examples/1.7.x/client-android/java/avatars/get-flag.md @@ -13,7 +13,7 @@ avatars.getFlag( Flag.AFGHANISTAN, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/client-android/java/storage/get-file-download.md b/docs/examples/1.7.x/client-android/java/storage/get-file-download.md index ce2b846cc0..73a8617fdd 100644 --- a/docs/examples/1.7.x/client-android/java/storage/get-file-download.md +++ b/docs/examples/1.7.x/client-android/java/storage/get-file-download.md @@ -11,6 +11,7 @@ Storage storage = new Storage(client); storage.getFileDownload( "", // bucketId "", // fileId + "", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/client-android/java/storage/get-file-preview.md b/docs/examples/1.7.x/client-android/java/storage/get-file-preview.md index 1f5e36539a..67b92ebf85 100644 --- a/docs/examples/1.7.x/client-android/java/storage/get-file-preview.md +++ b/docs/examples/1.7.x/client-android/java/storage/get-file-preview.md @@ -14,7 +14,7 @@ storage.getFilePreview( 0, // width (optional) 0, // height (optional) ImageGravity.CENTER, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) "", // borderColor (optional) 0, // borderRadius (optional) @@ -22,6 +22,7 @@ storage.getFilePreview( -360, // rotation (optional) "", // background (optional) ImageFormat.JPG, // output (optional) + "", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/client-android/java/storage/get-file-view.md b/docs/examples/1.7.x/client-android/java/storage/get-file-view.md index cda3545bad..b042b1f451 100644 --- a/docs/examples/1.7.x/client-android/java/storage/get-file-view.md +++ b/docs/examples/1.7.x/client-android/java/storage/get-file-view.md @@ -11,6 +11,7 @@ Storage storage = new Storage(client); storage.getFileView( "", // bucketId "", // fileId + "", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-browser.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-browser.md index 4e2f5e0991..d04adfbbdc 100644 --- a/docs/examples/1.7.x/client-android/kotlin/avatars/get-browser.md +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-browser.md @@ -13,5 +13,5 @@ val result = avatars.getBrowser( code = Browser.AVANT_BROWSER, width = 0, // (optional) height = 0, // (optional) - quality = 0, // (optional) + quality = -1, // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-credit-card.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-credit-card.md index 91aae45660..91c88da5dd 100644 --- a/docs/examples/1.7.x/client-android/kotlin/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-credit-card.md @@ -13,5 +13,5 @@ val result = avatars.getCreditCard( code = CreditCard.AMERICAN_EXPRESS, width = 0, // (optional) height = 0, // (optional) - quality = 0, // (optional) + quality = -1, // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/avatars/get-flag.md b/docs/examples/1.7.x/client-android/kotlin/avatars/get-flag.md index 1d8f5f6305..1dbc1cdf4b 100644 --- a/docs/examples/1.7.x/client-android/kotlin/avatars/get-flag.md +++ b/docs/examples/1.7.x/client-android/kotlin/avatars/get-flag.md @@ -13,5 +13,5 @@ val result = avatars.getFlag( code = Flag.AFGHANISTAN, width = 0, // (optional) height = 0, // (optional) - quality = 0, // (optional) + quality = -1, // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-download.md b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-download.md index b4d33868d2..89c6e8a992 100644 --- a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-download.md +++ b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-download.md @@ -11,4 +11,5 @@ val storage = Storage(client) val result = storage.getFileDownload( bucketId = "", fileId = "", + token = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-preview.md b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-preview.md index 31aa6e2ce7..d766dc7174 100644 --- a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-preview.md +++ b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-preview.md @@ -14,7 +14,7 @@ val result = storage.getFilePreview( width = 0, // (optional) height = 0, // (optional) gravity = ImageGravity.CENTER, // (optional) - quality = 0, // (optional) + quality = -1, // (optional) borderWidth = 0, // (optional) borderColor = "", // (optional) borderRadius = 0, // (optional) @@ -22,4 +22,5 @@ val result = storage.getFilePreview( rotation = -360, // (optional) background = "", // (optional) output = ImageFormat.JPG, // (optional) + token = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-view.md b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-view.md index 7a5b31de5b..513e1f9a90 100644 --- a/docs/examples/1.7.x/client-android/kotlin/storage/get-file-view.md +++ b/docs/examples/1.7.x/client-android/kotlin/storage/get-file-view.md @@ -11,4 +11,5 @@ val storage = Storage(client) val result = storage.getFileView( bucketId = "", fileId = "", + token = "", // (optional) ) \ No newline at end of file diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-browser.md index 8f326a87aa..ee0cc99f91 100644 --- a/docs/examples/1.7.x/client-apple/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-browser.md @@ -11,6 +11,6 @@ let bytes = try await avatars.getBrowser( code: .avantBrowser, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ) diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-credit-card.md index d294d807d5..779fce3f60 100644 --- a/docs/examples/1.7.x/client-apple/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-credit-card.md @@ -11,6 +11,6 @@ let bytes = try await avatars.getCreditCard( code: .americanExpress, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ) diff --git a/docs/examples/1.7.x/client-apple/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-apple/examples/avatars/get-flag.md index 710611739c..ba1d77be27 100644 --- a/docs/examples/1.7.x/client-apple/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/client-apple/examples/avatars/get-flag.md @@ -11,6 +11,6 @@ let bytes = try await avatars.getFlag( code: .afghanistan, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ) diff --git a/docs/examples/1.7.x/client-apple/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-apple/examples/storage/get-file-download.md index 92ac2a89ff..9338958ede 100644 --- a/docs/examples/1.7.x/client-apple/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/client-apple/examples/storage/get-file-download.md @@ -8,6 +8,7 @@ let storage = Storage(client) let bytes = try await storage.getFileDownload( bucketId: "", - fileId: "" + fileId: "", + token: "" // optional ) diff --git a/docs/examples/1.7.x/client-apple/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-apple/examples/storage/get-file-preview.md index d157635688..1395d7e782 100644 --- a/docs/examples/1.7.x/client-apple/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/client-apple/examples/storage/get-file-preview.md @@ -13,13 +13,14 @@ let bytes = try await storage.getFilePreview( width: 0, // optional height: 0, // optional gravity: .center, // optional - quality: 0, // optional + quality: -1, // optional borderWidth: 0, // optional borderColor: "", // optional borderRadius: 0, // optional opacity: 0, // optional rotation: -360, // optional background: "", // optional - output: .jpg // optional + output: .jpg, // optional + token: "" // optional ) diff --git a/docs/examples/1.7.x/client-apple/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-apple/examples/storage/get-file-view.md index 14843a7ae0..bc5ad02727 100644 --- a/docs/examples/1.7.x/client-apple/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/client-apple/examples/storage/get-file-view.md @@ -8,6 +8,7 @@ let storage = Storage(client) let bytes = try await storage.getFileView( bucketId: "", - fileId: "" + fileId: "", + token: "" // optional ) diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-browser.md index 0ca83b89aa..e97d24ab4f 100644 --- a/docs/examples/1.7.x/client-flutter/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-browser.md @@ -11,7 +11,7 @@ UInt8List bytes = await avatars.getBrowser( code: Browser.avantBrowser, width: 0, // optional height: 0, // optional - quality: 0, // optional + quality: -1, // optional ) final file = File('path_to_file/filename.ext'); @@ -23,7 +23,7 @@ FutureBuilder( code: Browser.avantBrowser, width:0 , // optional height:0 , // optional - quality:0 , // optional + quality:-1 , // optional ), // Works for both public file and private file, for private files you need to be logged in builder: (context, snapshot) { return snapshot.hasData && snapshot.data != null diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-credit-card.md index 1075e8196a..9ec42588b4 100644 --- a/docs/examples/1.7.x/client-flutter/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-credit-card.md @@ -11,7 +11,7 @@ UInt8List bytes = await avatars.getCreditCard( code: CreditCard.americanExpress, width: 0, // optional height: 0, // optional - quality: 0, // optional + quality: -1, // optional ) final file = File('path_to_file/filename.ext'); @@ -23,7 +23,7 @@ FutureBuilder( code: CreditCard.americanExpress, width:0 , // optional height:0 , // optional - quality:0 , // optional + quality:-1 , // optional ), // Works for both public file and private file, for private files you need to be logged in builder: (context, snapshot) { return snapshot.hasData && snapshot.data != null diff --git a/docs/examples/1.7.x/client-flutter/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-flutter/examples/avatars/get-flag.md index 3aae5bfba7..99d43409a0 100644 --- a/docs/examples/1.7.x/client-flutter/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/client-flutter/examples/avatars/get-flag.md @@ -11,7 +11,7 @@ UInt8List bytes = await avatars.getFlag( code: Flag.afghanistan, width: 0, // optional height: 0, // optional - quality: 0, // optional + quality: -1, // optional ) final file = File('path_to_file/filename.ext'); @@ -23,7 +23,7 @@ FutureBuilder( code: Flag.afghanistan, width:0 , // optional height:0 , // optional - quality:0 , // optional + quality:-1 , // optional ), // Works for both public file and private file, for private files you need to be logged in builder: (context, snapshot) { return snapshot.hasData && snapshot.data != null diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-download.md index 9048fe469b..5bef06ee7d 100644 --- a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-download.md @@ -10,6 +10,7 @@ Storage storage = Storage(client); UInt8List bytes = await storage.getFileDownload( bucketId: '', fileId: '', + token: '', // optional ) final file = File('path_to_file/filename.ext'); @@ -20,6 +21,7 @@ FutureBuilder( future: storage.getFileDownload( bucketId:'' , fileId:'' , + token:'' , // optional ), // Works for both public file and private file, for private files you need to be logged in builder: (context, snapshot) { return snapshot.hasData && snapshot.data != null diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-preview.md index 3d81e61c92..96338bd25a 100644 --- a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-preview.md @@ -13,7 +13,7 @@ UInt8List bytes = await storage.getFilePreview( width: 0, // optional height: 0, // optional gravity: ImageGravity.center, // optional - quality: 0, // optional + quality: -1, // optional borderWidth: 0, // optional borderColor: '', // optional borderRadius: 0, // optional @@ -21,6 +21,7 @@ UInt8List bytes = await storage.getFilePreview( rotation: -360, // optional background: '', // optional output: ImageFormat.jpg, // optional + token: '', // optional ) final file = File('path_to_file/filename.ext'); @@ -34,7 +35,7 @@ FutureBuilder( width:0 , // optional height:0 , // optional gravity: ImageGravity.center, // optional - quality:0 , // optional + quality:-1 , // optional borderWidth:0 , // optional borderColor:'' , // optional borderRadius:0 , // optional @@ -42,6 +43,7 @@ FutureBuilder( rotation:-360 , // optional background:'' , // optional output: ImageFormat.jpg, // optional + token:'' , // optional ), // Works for both public file and private file, for private files you need to be logged in builder: (context, snapshot) { return snapshot.hasData && snapshot.data != null diff --git a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-view.md index 7d43806c2c..6587f086bd 100644 --- a/docs/examples/1.7.x/client-flutter/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/client-flutter/examples/storage/get-file-view.md @@ -10,6 +10,7 @@ Storage storage = Storage(client); UInt8List bytes = await storage.getFileView( bucketId: '', fileId: '', + token: '', // optional ) final file = File('path_to_file/filename.ext'); @@ -20,6 +21,7 @@ FutureBuilder( future: storage.getFileView( bucketId:'' , fileId:'' , + token:'' , // optional ), // Works for both public file and private file, for private files you need to be logged in builder: (context, snapshot) { return snapshot.hasData && snapshot.data != null diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-browser.md index 6bb005e579..433cbe5999 100644 --- a/docs/examples/1.7.x/client-react-native/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-browser.md @@ -10,7 +10,7 @@ const result = avatars.getBrowser( Browser.AvantBrowser, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-credit-card.md index bdaaf8bfd6..bbd0007fe0 100644 --- a/docs/examples/1.7.x/client-react-native/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-credit-card.md @@ -10,7 +10,7 @@ const result = avatars.getCreditCard( CreditCard.AmericanExpress, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-react-native/examples/avatars/get-flag.md index ac7aaf98b3..4e6070d190 100644 --- a/docs/examples/1.7.x/client-react-native/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/client-react-native/examples/avatars/get-flag.md @@ -10,7 +10,7 @@ const result = avatars.getFlag( Flag.Afghanistan, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-download.md index c8dcea3d8d..e21bad67eb 100644 --- a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-download.md @@ -8,7 +8,8 @@ const storage = new Storage(client); const result = storage.getFileDownload( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-preview.md index b41236f619..6f116c5df6 100644 --- a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-preview.md @@ -12,14 +12,15 @@ const result = storage.getFilePreview( 0, // width (optional) 0, // height (optional) ImageGravity.Center, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) '', // borderColor (optional) 0, // borderRadius (optional) 0, // opacity (optional) -360, // rotation (optional) '', // background (optional) - ImageFormat.Jpg // output (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-view.md index 06443a894a..9b229f6a54 100644 --- a/docs/examples/1.7.x/client-react-native/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/client-react-native/examples/storage/get-file-view.md @@ -8,7 +8,8 @@ const storage = new Storage(client); const result = storage.getFileView( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-browser.md b/docs/examples/1.7.x/client-web/examples/avatars/get-browser.md index f4c342fb03..08512d1dc7 100644 --- a/docs/examples/1.7.x/client-web/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-browser.md @@ -10,7 +10,7 @@ const result = avatars.getBrowser( Browser.AvantBrowser, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/client-web/examples/avatars/get-credit-card.md index 9efd0d62f1..fb631a4e3e 100644 --- a/docs/examples/1.7.x/client-web/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-credit-card.md @@ -10,7 +10,7 @@ const result = avatars.getCreditCard( CreditCard.AmericanExpress, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/avatars/get-flag.md b/docs/examples/1.7.x/client-web/examples/avatars/get-flag.md index fc78922e24..bfbc6c2865 100644 --- a/docs/examples/1.7.x/client-web/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/client-web/examples/avatars/get-flag.md @@ -10,7 +10,7 @@ const result = avatars.getFlag( Flag.Afghanistan, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/get-file-download.md b/docs/examples/1.7.x/client-web/examples/storage/get-file-download.md index 2cd3cd4feb..3ebb8f8f71 100644 --- a/docs/examples/1.7.x/client-web/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/client-web/examples/storage/get-file-download.md @@ -8,7 +8,8 @@ const storage = new Storage(client); const result = storage.getFileDownload( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/get-file-preview.md b/docs/examples/1.7.x/client-web/examples/storage/get-file-preview.md index 40ffcffa94..ffc64c9f3a 100644 --- a/docs/examples/1.7.x/client-web/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/client-web/examples/storage/get-file-preview.md @@ -12,14 +12,15 @@ const result = storage.getFilePreview( 0, // width (optional) 0, // height (optional) ImageGravity.Center, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) '', // borderColor (optional) 0, // borderRadius (optional) 0, // opacity (optional) -360, // rotation (optional) '', // background (optional) - ImageFormat.Jpg // output (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/client-web/examples/storage/get-file-view.md b/docs/examples/1.7.x/client-web/examples/storage/get-file-view.md index ced0010f51..add5a6fba5 100644 --- a/docs/examples/1.7.x/client-web/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/client-web/examples/storage/get-file-view.md @@ -8,7 +8,8 @@ const storage = new Storage(client); const result = storage.getFileView( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-cli/examples/databases/create-index.md b/docs/examples/1.7.x/console-cli/examples/databases/create-index.md index d8f96c0e55..2dc95ea921 100644 --- a/docs/examples/1.7.x/console-cli/examples/databases/create-index.md +++ b/docs/examples/1.7.x/console-cli/examples/databases/create-index.md @@ -5,3 +5,4 @@ appwrite databases createIndex \ --type key \ --attributes one two three \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md index c97c074b35..79f3368d87 100644 --- a/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-download.md @@ -1,3 +1,4 @@ appwrite storage getFileDownload \ --bucketId \ - --fileId + --fileId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md index 82565fb5e7..de437af65b 100644 --- a/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-preview.md @@ -12,3 +12,4 @@ appwrite storage getFilePreview \ + diff --git a/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md b/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md index ac3bb9d742..689cf1233b 100644 --- a/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/console-cli/examples/storage/get-file-view.md @@ -1,3 +1,4 @@ appwrite storage getFileView \ --bucketId \ - --fileId + --fileId \ + diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md b/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md index 6cb1fef5ba..8de8d7ac6c 100644 --- a/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/console-cli/examples/tokens/create-file-token.md @@ -2,4 +2,3 @@ appwrite tokens createFileToken \ --bucketId \ --fileId \ - diff --git a/docs/examples/1.7.x/console-cli/examples/tokens/update.md b/docs/examples/1.7.x/console-cli/examples/tokens/update.md index 089b535167..73f21609b6 100644 --- a/docs/examples/1.7.x/console-cli/examples/tokens/update.md +++ b/docs/examples/1.7.x/console-cli/examples/tokens/update.md @@ -1,4 +1,3 @@ appwrite tokens update \ --tokenId \ - diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md b/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md index fd6c878ba2..65e7c826ff 100644 --- a/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-browser.md @@ -10,7 +10,7 @@ const result = avatars.getBrowser( Browser.AvantBrowser, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md index 96e2d6b5fa..bda5407b27 100644 --- a/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-credit-card.md @@ -10,7 +10,7 @@ const result = avatars.getCreditCard( CreditCard.AmericanExpress, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md b/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md index 172d21d29e..f6c0814abd 100644 --- a/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/console-web/examples/avatars/get-flag.md @@ -10,7 +10,7 @@ const result = avatars.getFlag( Flag.Afghanistan, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/databases/create-index.md b/docs/examples/1.7.x/console-web/examples/databases/create-index.md index f75857fc98..6a35f55349 100644 --- a/docs/examples/1.7.x/console-web/examples/databases/create-index.md +++ b/docs/examples/1.7.x/console-web/examples/databases/create-index.md @@ -12,7 +12,8 @@ const result = await databases.createIndex( '', // key IndexType.Key, // type [], // attributes - [] // orders (optional) + [], // orders (optional) + [] // lengths (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md index 8cef65e7df..8e98105ef3 100644 --- a/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-download.md @@ -8,7 +8,8 @@ const storage = new Storage(client); const result = storage.getFileDownload( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md index e844be00c6..b14a02769e 100644 --- a/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-preview.md @@ -12,14 +12,15 @@ const result = storage.getFilePreview( 0, // width (optional) 0, // height (optional) ImageGravity.Center, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) '', // borderColor (optional) 0, // borderRadius (optional) 0, // opacity (optional) -360, // rotation (optional) '', // background (optional) - ImageFormat.Jpg // output (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md b/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md index 6444fd0ac8..03db75f044 100644 --- a/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/console-web/examples/storage/get-file-view.md @@ -8,7 +8,8 @@ const storage = new Storage(client); const result = storage.getFileView( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md b/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md index 122233806b..bac4863159 100644 --- a/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/console-web/examples/tokens/create-file-token.md @@ -9,8 +9,7 @@ const tokens = new Tokens(client); const result = await tokens.createFileToken( '', // bucketId '', // fileId - '', // expire (optional) - ["read("any")"] // permissions (optional) + '' // expire (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/console-web/examples/tokens/update.md b/docs/examples/1.7.x/console-web/examples/tokens/update.md index 6a763b09f3..ce3b80dd22 100644 --- a/docs/examples/1.7.x/console-web/examples/tokens/update.md +++ b/docs/examples/1.7.x/console-web/examples/tokens/update.md @@ -8,8 +8,7 @@ const tokens = new Tokens(client); const result = await tokens.update( '', // tokenId - '', // expire (optional) - ["read("any")"] // permissions (optional) + '' // expire (optional) ); console.log(result); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-browser.md index 902c719af5..8d5287511d 100644 --- a/docs/examples/1.7.x/server-dart/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-browser.md @@ -11,5 +11,5 @@ UInt8List result = await avatars.getBrowser( code: Browser.avantBrowser, width: 0, // (optional) height: 0, // (optional) - quality: 0, // (optional) + quality: -1, // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-credit-card.md index b242d27123..88fe35ebd9 100644 --- a/docs/examples/1.7.x/server-dart/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-credit-card.md @@ -11,5 +11,5 @@ UInt8List result = await avatars.getCreditCard( code: CreditCard.americanExpress, width: 0, // (optional) height: 0, // (optional) - quality: 0, // (optional) + quality: -1, // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-dart/examples/avatars/get-flag.md index 5eaed135ae..56046681bc 100644 --- a/docs/examples/1.7.x/server-dart/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-dart/examples/avatars/get-flag.md @@ -11,5 +11,5 @@ UInt8List result = await avatars.getFlag( code: Flag.afghanistan, width: 0, // (optional) height: 0, // (optional) - quality: 0, // (optional) + quality: -1, // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/databases/create-index.md b/docs/examples/1.7.x/server-dart/examples/databases/create-index.md index ff847a9493..c3fa1abd60 100644 --- a/docs/examples/1.7.x/server-dart/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-dart/examples/databases/create-index.md @@ -14,4 +14,5 @@ Index result = await databases.createIndex( type: IndexType.key, attributes: [], orders: [], // (optional) + lengths: [], // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-dart/examples/storage/get-file-download.md index 09f06c04fc..8c119c386c 100644 --- a/docs/examples/1.7.x/server-dart/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-file-download.md @@ -10,4 +10,5 @@ Storage storage = Storage(client); UInt8List result = await storage.getFileDownload( bucketId: '', fileId: '', + token: '', // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-dart/examples/storage/get-file-preview.md index 7fd69c5692..a1f3c09b33 100644 --- a/docs/examples/1.7.x/server-dart/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-file-preview.md @@ -13,7 +13,7 @@ UInt8List result = await storage.getFilePreview( width: 0, // (optional) height: 0, // (optional) gravity: ImageGravity.center, // (optional) - quality: 0, // (optional) + quality: -1, // (optional) borderWidth: 0, // (optional) borderColor: '', // (optional) borderRadius: 0, // (optional) @@ -21,4 +21,5 @@ UInt8List result = await storage.getFilePreview( rotation: -360, // (optional) background: '', // (optional) output: ImageFormat.jpg, // (optional) + token: '', // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-dart/examples/storage/get-file-view.md index df5d3a20ff..d48b51c19c 100644 --- a/docs/examples/1.7.x/server-dart/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-dart/examples/storage/get-file-view.md @@ -10,4 +10,5 @@ Storage storage = Storage(client); UInt8List result = await storage.getFileView( bucketId: '', fileId: '', + token: '', // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-dart/examples/tokens/create-file-token.md index 8a31f47ffd..cc75a91726 100644 --- a/docs/examples/1.7.x/server-dart/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-dart/examples/tokens/create-file-token.md @@ -3,7 +3,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key Tokens tokens = Tokens(client); @@ -11,5 +11,4 @@ ResourceToken result = await tokens.createFileToken( bucketId: '', fileId: '', expire: '', // (optional) - permissions: ["read("any")"], // (optional) ); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/delete.md b/docs/examples/1.7.x/server-dart/examples/tokens/delete.md index 4b9c0253ce..ce95e7b752 100644 --- a/docs/examples/1.7.x/server-dart/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-dart/examples/tokens/delete.md @@ -3,7 +3,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key Tokens tokens = Tokens(client); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/get.md b/docs/examples/1.7.x/server-dart/examples/tokens/get.md index 1106f570c9..3112b5e1e5 100644 --- a/docs/examples/1.7.x/server-dart/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-dart/examples/tokens/get.md @@ -3,7 +3,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key Tokens tokens = Tokens(client); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/list.md b/docs/examples/1.7.x/server-dart/examples/tokens/list.md index 4ec5e967d5..5331e44de3 100644 --- a/docs/examples/1.7.x/server-dart/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-dart/examples/tokens/list.md @@ -3,7 +3,7 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key Tokens tokens = Tokens(client); diff --git a/docs/examples/1.7.x/server-dart/examples/tokens/update.md b/docs/examples/1.7.x/server-dart/examples/tokens/update.md index 952ff569aa..47e910d574 100644 --- a/docs/examples/1.7.x/server-dart/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-dart/examples/tokens/update.md @@ -3,12 +3,11 @@ import 'package:dart_appwrite/dart_appwrite.dart'; Client client = Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key Tokens tokens = Tokens(client); ResourceToken result = await tokens.update( tokenId: '', expire: '', // (optional) - permissions: ["read("any")"], // (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-browser.md index f0a355a460..5443200b39 100644 --- a/docs/examples/1.7.x/server-deno/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-browser.md @@ -11,5 +11,5 @@ const result = avatars.getBrowser( Browser.AvantBrowser, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-credit-card.md index 040b06c59e..8bcc67e08c 100644 --- a/docs/examples/1.7.x/server-deno/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-credit-card.md @@ -11,5 +11,5 @@ const result = avatars.getCreditCard( CreditCard.AmericanExpress, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-deno/examples/avatars/get-flag.md index 937724f118..6837438c10 100644 --- a/docs/examples/1.7.x/server-deno/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-deno/examples/avatars/get-flag.md @@ -11,5 +11,5 @@ const result = avatars.getFlag( Flag.Afghanistan, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/databases/create-index.md b/docs/examples/1.7.x/server-deno/examples/databases/create-index.md index 69e694bbba..3ab3c7a3aa 100644 --- a/docs/examples/1.7.x/server-deno/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-deno/examples/databases/create-index.md @@ -13,5 +13,6 @@ const response = await databases.createIndex( '', // key IndexType.Key, // type [], // attributes - [] // orders (optional) + [], // orders (optional) + [] // lengths (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-deno/examples/storage/get-file-download.md index 8319e64f09..df11f40b80 100644 --- a/docs/examples/1.7.x/server-deno/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-file-download.md @@ -9,5 +9,6 @@ const storage = new Storage(client); const result = storage.getFileDownload( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-deno/examples/storage/get-file-preview.md index ed87c3549e..6457c7831b 100644 --- a/docs/examples/1.7.x/server-deno/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-file-preview.md @@ -13,12 +13,13 @@ const result = storage.getFilePreview( 0, // width (optional) 0, // height (optional) ImageGravity.Center, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) '', // borderColor (optional) 0, // borderRadius (optional) 0, // opacity (optional) -360, // rotation (optional) '', // background (optional) - ImageFormat.Jpg // output (optional) + ImageFormat.Jpg, // output (optional) + '' // token (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-deno/examples/storage/get-file-view.md index b18cffcd01..5a1dbac86a 100644 --- a/docs/examples/1.7.x/server-deno/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-deno/examples/storage/get-file-view.md @@ -9,5 +9,6 @@ const storage = new Storage(client); const result = storage.getFileView( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-deno/examples/tokens/create-file-token.md index 276fe2de78..7c24738cb5 100644 --- a/docs/examples/1.7.x/server-deno/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-deno/examples/tokens/create-file-token.md @@ -3,13 +3,12 @@ import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new Tokens(client); const response = await tokens.createFileToken( '', // bucketId '', // fileId - '', // expire (optional) - ["read("any")"] // permissions (optional) + '' // expire (optional) ); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/delete.md b/docs/examples/1.7.x/server-deno/examples/tokens/delete.md index 2c383a19f4..b5e3adfa35 100644 --- a/docs/examples/1.7.x/server-deno/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-deno/examples/tokens/delete.md @@ -3,7 +3,7 @@ import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/get.md b/docs/examples/1.7.x/server-deno/examples/tokens/get.md index 677d05b543..2bb827d870 100644 --- a/docs/examples/1.7.x/server-deno/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-deno/examples/tokens/get.md @@ -3,7 +3,7 @@ import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/list.md b/docs/examples/1.7.x/server-deno/examples/tokens/list.md index ceb0427ba1..7208a53553 100644 --- a/docs/examples/1.7.x/server-deno/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-deno/examples/tokens/list.md @@ -3,7 +3,7 @@ import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-deno/examples/tokens/update.md b/docs/examples/1.7.x/server-deno/examples/tokens/update.md index 575651542b..4464a0ccf8 100644 --- a/docs/examples/1.7.x/server-deno/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-deno/examples/tokens/update.md @@ -3,12 +3,11 @@ import { Client, Tokens } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new Tokens(client); const response = await tokens.update( '', // tokenId - '', // expire (optional) - ["read("any")"] // permissions (optional) + '' // expire (optional) ); diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-browser.md index 888f97e288..9c7b643af1 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-browser.md @@ -14,5 +14,5 @@ byte[] result = await avatars.GetBrowser( code: Browser.AvantBrowser, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-credit-card.md index 01ee3e533e..a41ade1438 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-credit-card.md @@ -14,5 +14,5 @@ byte[] result = await avatars.GetCreditCard( code: CreditCard.AmericanExpress, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-flag.md index a4890b962e..f7a3e05cee 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-dotnet/examples/avatars/get-flag.md @@ -14,5 +14,5 @@ byte[] result = await avatars.GetFlag( code: Flag.Afghanistan, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/databases/create-index.md b/docs/examples/1.7.x/server-dotnet/examples/databases/create-index.md index b132cd2f02..ae5583c68d 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-dotnet/examples/databases/create-index.md @@ -16,5 +16,6 @@ Index result = await databases.CreateIndex( key: "", type: IndexType.Key, attributes: new List(), - orders: new List() // optional + orders: new List(), // optional + lengths: new List() // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-download.md index 5f27e48c16..514fda9e9c 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-download.md @@ -11,5 +11,6 @@ Storage storage = new Storage(client); byte[] result = await storage.GetFileDownload( bucketId: "", - fileId: "" + fileId: "", + token: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-preview.md index a48a84eafc..c9ec508b4a 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-preview.md @@ -16,12 +16,13 @@ byte[] result = await storage.GetFilePreview( width: 0, // optional height: 0, // optional gravity: ImageGravity.Center, // optional - quality: 0, // optional + quality: -1, // optional borderWidth: 0, // optional borderColor: "", // optional borderRadius: 0, // optional opacity: 0, // optional rotation: -360, // optional background: "", // optional - output: ImageFormat.Jpg // optional + output: ImageFormat.Jpg, // optional + token: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-view.md index f8ad1b0bc1..1a27dc153c 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-dotnet/examples/storage/get-file-view.md @@ -11,5 +11,6 @@ Storage storage = new Storage(client); byte[] result = await storage.GetFileView( bucketId: "", - fileId: "" + fileId: "", + token: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/create-file-token.md index 0b2794691a..70f4ed3900 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/create-file-token.md @@ -5,13 +5,12 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("") // Your project ID - .SetSession(""); // The user session to authenticate with + .SetKey(""); // Your secret API key Tokens tokens = new Tokens(client); ResourceToken result = await tokens.CreateFileToken( bucketId: "", fileId: "", - expire: "", // optional - permissions: ["read("any")"] // optional + expire: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/delete.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/delete.md index eeeffc482c..e88147c1c9 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/delete.md @@ -5,7 +5,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("") // Your project ID - .SetSession(""); // The user session to authenticate with + .SetKey(""); // Your secret API key Tokens tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/get.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/get.md index d4585b85ad..da9b431017 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/get.md @@ -5,7 +5,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("") // Your project ID - .SetSession(""); // The user session to authenticate with + .SetKey(""); // Your secret API key Tokens tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/list.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/list.md index 3648c15519..68579f237b 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/list.md @@ -5,7 +5,7 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("") // Your project ID - .SetSession(""); // The user session to authenticate with + .SetKey(""); // Your secret API key Tokens tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-dotnet/examples/tokens/update.md b/docs/examples/1.7.x/server-dotnet/examples/tokens/update.md index 12166d1a1a..b7604182ab 100644 --- a/docs/examples/1.7.x/server-dotnet/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-dotnet/examples/tokens/update.md @@ -5,12 +5,11 @@ using Appwrite.Services; Client client = new Client() .SetEndPoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .SetProject("") // Your project ID - .SetSession(""); // The user session to authenticate with + .SetKey(""); // Your secret API key Tokens tokens = new Tokens(client); ResourceToken result = await tokens.Update( tokenId: "", - expire: "", // optional - permissions: ["read("any")"] // optional + expire: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md index 31f16ec7be..34f3bf58f9 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-browser.md @@ -18,7 +18,7 @@ func main() { "aa", avatars.WithGetBrowserWidth(0), avatars.WithGetBrowserHeight(0), - avatars.WithGetBrowserQuality(0), + avatars.WithGetBrowserQuality(-1), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md index 51d3f589db..764debd877 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-credit-card.md @@ -18,7 +18,7 @@ func main() { "amex", avatars.WithGetCreditCardWidth(0), avatars.WithGetCreditCardHeight(0), - avatars.WithGetCreditCardQuality(0), + avatars.WithGetCreditCardQuality(-1), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md index 74e11ef43a..dfda1ed687 100644 --- a/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-go/examples/avatars/get-flag.md @@ -18,7 +18,7 @@ func main() { "af", avatars.WithGetFlagWidth(0), avatars.WithGetFlagHeight(0), - avatars.WithGetFlagQuality(0), + avatars.WithGetFlagQuality(-1), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/databases/create-index.md b/docs/examples/1.7.x/server-go/examples/databases/create-index.md index 3544bd9f58..83e97d8e36 100644 --- a/docs/examples/1.7.x/server-go/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-go/examples/databases/create-index.md @@ -21,6 +21,7 @@ func main() { "key", []interface{}{}, databases.WithCreateIndexOrders([]interface{}{}), + databases.WithCreateIndexLengths([]interface{}{}), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md index b8c8202460..9aa461de89 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-download.md @@ -17,6 +17,7 @@ func main() { response, error := service.GetFileDownload( "", "", + storage.WithGetFileDownloadToken(""), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md index ffa1ad4a4a..511cad1325 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-preview.md @@ -20,7 +20,7 @@ func main() { storage.WithGetFilePreviewWidth(0), storage.WithGetFilePreviewHeight(0), storage.WithGetFilePreviewGravity("center"), - storage.WithGetFilePreviewQuality(0), + storage.WithGetFilePreviewQuality(-1), storage.WithGetFilePreviewBorderWidth(0), storage.WithGetFilePreviewBorderColor(""), storage.WithGetFilePreviewBorderRadius(0), @@ -28,6 +28,7 @@ func main() { storage.WithGetFilePreviewRotation(-360), storage.WithGetFilePreviewBackground(""), storage.WithGetFilePreviewOutput("jpg"), + storage.WithGetFilePreviewToken(""), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md index f8685f42d5..5832517534 100644 --- a/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-go/examples/storage/get-file-view.md @@ -17,6 +17,7 @@ func main() { response, error := service.GetFileView( "", "", + storage.WithGetFileViewToken(""), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md index 96c9947c7c..8343e3e077 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/create-file-token.md @@ -11,14 +11,13 @@ func main() { client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with + client.SetKey("") // Your secret API key service := tokens.NewTokens(client) response, error := service.CreateFileToken( "", "", tokens.WithCreateFileTokenExpire(""), - tokens.WithCreateFileTokenPermissions(interface{}{"read("any")"}), ) if error != nil { diff --git a/docs/examples/1.7.x/server-go/examples/tokens/delete.md b/docs/examples/1.7.x/server-go/examples/tokens/delete.md index f632e6e5ea..73322e6c9b 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/delete.md @@ -11,7 +11,7 @@ func main() { client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with + client.SetKey("") // Your secret API key service := tokens.NewTokens(client) response, error := service.Delete( diff --git a/docs/examples/1.7.x/server-go/examples/tokens/get.md b/docs/examples/1.7.x/server-go/examples/tokens/get.md index b7b44fabd3..64b53a24b9 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/get.md @@ -11,7 +11,7 @@ func main() { client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with + client.SetKey("") // Your secret API key service := tokens.NewTokens(client) response, error := service.Get( diff --git a/docs/examples/1.7.x/server-go/examples/tokens/list.md b/docs/examples/1.7.x/server-go/examples/tokens/list.md index 2bb4d987d8..e4864cd74a 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/list.md @@ -11,7 +11,7 @@ func main() { client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with + client.SetKey("") // Your secret API key service := tokens.NewTokens(client) response, error := service.List( diff --git a/docs/examples/1.7.x/server-go/examples/tokens/update.md b/docs/examples/1.7.x/server-go/examples/tokens/update.md index 4839293902..94c30ece79 100644 --- a/docs/examples/1.7.x/server-go/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-go/examples/tokens/update.md @@ -11,13 +11,12 @@ func main() { client.SetEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint client.SetProject("") // Your project ID - client.SetSession("") // The user session to authenticate with + client.SetKey("") // Your secret API key service := tokens.NewTokens(client) response, error := service.Update( "", tokens.WithUpdateExpire(""), - tokens.WithUpdatePermissions(interface{}{"read("any")"}), ) if error != nil { diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-collection.md index 51eb51f410..00dfba1e7b 100644 --- a/docs/examples/1.7.x/server-graphql/examples/databases/create-collection.md +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-collection.md @@ -22,6 +22,7 @@ mutation { status error attributes + lengths orders _createdAt _updatedAt diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.7.x/server-graphql/examples/databases/create-index.md index 2875a9b4b7..c647930943 100644 --- a/docs/examples/1.7.x/server-graphql/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-graphql/examples/databases/create-index.md @@ -5,13 +5,15 @@ mutation { key: "", type: "key", attributes: [], - orders: [] + orders: [], + lengths: [] ) { key type status error attributes + lengths orders _createdAt _updatedAt diff --git a/docs/examples/1.7.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.7.x/server-graphql/examples/databases/update-collection.md index e918c058b8..040578ae9d 100644 --- a/docs/examples/1.7.x/server-graphql/examples/databases/update-collection.md +++ b/docs/examples/1.7.x/server-graphql/examples/databases/update-collection.md @@ -22,6 +22,7 @@ mutation { status error attributes + lengths orders _createdAt _updatedAt diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-graphql/examples/tokens/create-file-token.md index 939186fa84..22cff062fa 100644 --- a/docs/examples/1.7.x/server-graphql/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/create-file-token.md @@ -2,15 +2,14 @@ mutation { tokensCreateFileToken( bucketId: "", fileId: "", - expire: "", - permissions: ["read("any")"] + expire: "" ) { _id _createdAt - _permissions resourceId resourceType expire + secret accessedAt } } diff --git a/docs/examples/1.7.x/server-graphql/examples/tokens/update.md b/docs/examples/1.7.x/server-graphql/examples/tokens/update.md index 14edf0b917..2f7324fd04 100644 --- a/docs/examples/1.7.x/server-graphql/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-graphql/examples/tokens/update.md @@ -1,15 +1,14 @@ mutation { tokensUpdate( tokenId: "", - expire: "", - permissions: ["read("any")"] + expire: "" ) { _id _createdAt - _permissions resourceId resourceType expire + secret accessedAt } } diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-browser.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-browser.md index c87d5e9100..9c3433eef5 100644 --- a/docs/examples/1.7.x/server-kotlin/java/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-browser.md @@ -14,7 +14,7 @@ avatars.getBrowser( Browser.AVANT_BROWSER, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-credit-card.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-credit-card.md index ddb53a67ec..6904638106 100644 --- a/docs/examples/1.7.x/server-kotlin/java/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-credit-card.md @@ -14,7 +14,7 @@ avatars.getCreditCard( CreditCard.AMERICAN_EXPRESS, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/avatars/get-flag.md b/docs/examples/1.7.x/server-kotlin/java/avatars/get-flag.md index aadf4267c9..159dcdcde6 100644 --- a/docs/examples/1.7.x/server-kotlin/java/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-kotlin/java/avatars/get-flag.md @@ -14,7 +14,7 @@ avatars.getFlag( Flag.AFGHANISTAN, // code 0, // width (optional) 0, // height (optional) - 0, // quality (optional) + -1, // quality (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/databases/create-index.md b/docs/examples/1.7.x/server-kotlin/java/databases/create-index.md index f3faec7fdd..fe2d9bf66d 100644 --- a/docs/examples/1.7.x/server-kotlin/java/databases/create-index.md +++ b/docs/examples/1.7.x/server-kotlin/java/databases/create-index.md @@ -17,6 +17,7 @@ databases.createIndex( IndexType.KEY, // type listOf(), // attributes listOf(), // orders (optional) + listOf(), // lengths (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-download.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-download.md index d0399f94e2..edda2609b5 100644 --- a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-download.md @@ -12,6 +12,7 @@ Storage storage = new Storage(client); storage.getFileDownload( "", // bucketId "", // fileId + "", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-preview.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-preview.md index dd7c09d33b..1a0ab596bc 100644 --- a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-preview.md @@ -15,7 +15,7 @@ storage.getFilePreview( 0, // width (optional) 0, // height (optional) ImageGravity.CENTER, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) "", // borderColor (optional) 0, // borderRadius (optional) @@ -23,6 +23,7 @@ storage.getFilePreview( -360, // rotation (optional) "", // background (optional) ImageFormat.JPG, // output (optional) + "", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-view.md b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-view.md index 1de4ae0317..178e50776c 100644 --- a/docs/examples/1.7.x/server-kotlin/java/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-kotlin/java/storage/get-file-view.md @@ -12,6 +12,7 @@ Storage storage = new Storage(client); storage.getFileView( "", // bucketId "", // fileId + "", // token (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/create-file-token.md b/docs/examples/1.7.x/server-kotlin/java/tokens/create-file-token.md index 09ff8252d3..6996641d40 100644 --- a/docs/examples/1.7.x/server-kotlin/java/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/create-file-token.md @@ -5,7 +5,7 @@ import io.appwrite.services.Tokens; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with + .setKey(""); // Your secret API key Tokens tokens = new Tokens(client); @@ -13,7 +13,6 @@ tokens.createFileToken( "", // bucketId "", // fileId "", // expire (optional) - listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/delete.md b/docs/examples/1.7.x/server-kotlin/java/tokens/delete.md index ca84a1f8c4..bf1874d2f8 100644 --- a/docs/examples/1.7.x/server-kotlin/java/tokens/delete.md +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/delete.md @@ -5,7 +5,7 @@ import io.appwrite.services.Tokens; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with + .setKey(""); // Your secret API key Tokens tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/get.md b/docs/examples/1.7.x/server-kotlin/java/tokens/get.md index 593914c91a..c55563c2e1 100644 --- a/docs/examples/1.7.x/server-kotlin/java/tokens/get.md +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/get.md @@ -5,7 +5,7 @@ import io.appwrite.services.Tokens; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with + .setKey(""); // Your secret API key Tokens tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/list.md b/docs/examples/1.7.x/server-kotlin/java/tokens/list.md index 9bfc13b8d1..a59e9f5ee8 100644 --- a/docs/examples/1.7.x/server-kotlin/java/tokens/list.md +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/list.md @@ -5,7 +5,7 @@ import io.appwrite.services.Tokens; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with + .setKey(""); // Your secret API key Tokens tokens = new Tokens(client); diff --git a/docs/examples/1.7.x/server-kotlin/java/tokens/update.md b/docs/examples/1.7.x/server-kotlin/java/tokens/update.md index eec9a61a0d..2a44f2d16e 100644 --- a/docs/examples/1.7.x/server-kotlin/java/tokens/update.md +++ b/docs/examples/1.7.x/server-kotlin/java/tokens/update.md @@ -5,14 +5,13 @@ import io.appwrite.services.Tokens; Client client = new Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession(""); // The user session to authenticate with + .setKey(""); // Your secret API key Tokens tokens = new Tokens(client); tokens.update( "", // tokenId "", // expire (optional) - listOf("read("any")"), // permissions (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-browser.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-browser.md index e9b95c9422..f289205ab0 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-browser.md @@ -14,5 +14,5 @@ val result = avatars.getBrowser( code = Browser.AVANT_BROWSER, width = 0, // optional height = 0, // optional - quality = 0 // optional + quality = -1 // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-credit-card.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-credit-card.md index 8554dbd00e..1fd00a24bd 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-credit-card.md @@ -14,5 +14,5 @@ val result = avatars.getCreditCard( code = CreditCard.AMERICAN_EXPRESS, width = 0, // optional height = 0, // optional - quality = 0 // optional + quality = -1 // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-flag.md b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-flag.md index 011a7296b2..a16aefcffd 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/avatars/get-flag.md @@ -14,5 +14,5 @@ val result = avatars.getFlag( code = Flag.AFGHANISTAN, width = 0, // optional height = 0, // optional - quality = 0 // optional + quality = -1 // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-index.md b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-index.md index 7ada0f743b..da777ac906 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-index.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/databases/create-index.md @@ -16,5 +16,6 @@ val response = databases.createIndex( key = "", type = IndexType.KEY, attributes = listOf(), - orders = listOf() // optional + orders = listOf(), // optional + lengths = listOf() // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-download.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-download.md index f3422f958d..c14c966b8b 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-download.md @@ -11,5 +11,6 @@ val storage = Storage(client) val result = storage.getFileDownload( bucketId = "", - fileId = "" + fileId = "", + token = "" // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-preview.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-preview.md index 8c37ce832e..45122de2f8 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-preview.md @@ -15,12 +15,13 @@ val result = storage.getFilePreview( width = 0, // optional height = 0, // optional gravity = "center", // optional - quality = 0, // optional + quality = -1, // optional borderWidth = 0, // optional borderColor = "", // optional borderRadius = 0, // optional opacity = 0, // optional rotation = -360, // optional background = "", // optional - output = "jpg" // optional + output = "jpg", // optional + token = "" // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-view.md b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-view.md index cf8cde33c4..fec1ec7162 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/storage/get-file-view.md @@ -11,5 +11,6 @@ val storage = Storage(client) val result = storage.getFileView( bucketId = "", - fileId = "" + fileId = "", + token = "" // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/create-file-token.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/create-file-token.md index 77c5bdc5d8..63d8fc301b 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/create-file-token.md @@ -5,13 +5,12 @@ import io.appwrite.services.Tokens val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key val tokens = Tokens(client) val response = tokens.createFileToken( bucketId = "", fileId = "", - expire = "", // optional - permissions = listOf("read("any")") // optional + expire = "" // optional ) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/delete.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/delete.md index 05a3c9f7df..1831bc6a87 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/delete.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/delete.md @@ -5,7 +5,7 @@ import io.appwrite.services.Tokens val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key val tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get.md index 740cda546a..70a47c2349 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/get.md @@ -5,7 +5,7 @@ import io.appwrite.services.Tokens val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key val tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/list.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/list.md index 1618c1cb1a..697579065c 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/list.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/list.md @@ -5,7 +5,7 @@ import io.appwrite.services.Tokens val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key val tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/update.md b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/update.md index 8a824139f8..045ddaae4a 100644 --- a/docs/examples/1.7.x/server-kotlin/kotlin/tokens/update.md +++ b/docs/examples/1.7.x/server-kotlin/kotlin/tokens/update.md @@ -5,12 +5,11 @@ import io.appwrite.services.Tokens val client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key val tokens = Tokens(client) val response = tokens.update( tokenId = "", - expire = "", // optional - permissions = listOf("read("any")") // optional + expire = "" // optional ) diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-browser.md index 3bcd70d0f2..1cc825d917 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-browser.md @@ -11,5 +11,5 @@ const result = await avatars.getBrowser( sdk.Browser.AvantBrowser, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-credit-card.md index a60c2da86e..7d62a96033 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-credit-card.md @@ -11,5 +11,5 @@ const result = await avatars.getCreditCard( sdk.CreditCard.AmericanExpress, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-flag.md index df0164d280..a62f56dd47 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-nodejs/examples/avatars/get-flag.md @@ -11,5 +11,5 @@ const result = await avatars.getFlag( sdk.Flag.Afghanistan, // code 0, // width (optional) 0, // height (optional) - 0 // quality (optional) + -1 // quality (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/databases/create-index.md b/docs/examples/1.7.x/server-nodejs/examples/databases/create-index.md index bd616222a6..ed03322cbd 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-nodejs/examples/databases/create-index.md @@ -13,5 +13,6 @@ const result = await databases.createIndex( '', // key sdk.IndexType.Key, // type [], // attributes - [] // orders (optional) + [], // orders (optional) + [] // lengths (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-download.md index 051f51c842..6935bede48 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-download.md @@ -9,5 +9,6 @@ const storage = new sdk.Storage(client); const result = await storage.getFileDownload( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-preview.md index 45da053c50..fe24419c52 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-preview.md @@ -13,12 +13,13 @@ const result = await storage.getFilePreview( 0, // width (optional) 0, // height (optional) sdk.ImageGravity.Center, // gravity (optional) - 0, // quality (optional) + -1, // quality (optional) 0, // borderWidth (optional) '', // borderColor (optional) 0, // borderRadius (optional) 0, // opacity (optional) -360, // rotation (optional) '', // background (optional) - sdk.ImageFormat.Jpg // output (optional) + sdk.ImageFormat.Jpg, // output (optional) + '' // token (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-view.md index fd06b3088b..9493cfb0a3 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-nodejs/examples/storage/get-file-view.md @@ -9,5 +9,6 @@ const storage = new sdk.Storage(client); const result = await storage.getFileView( '', // bucketId - '' // fileId + '', // fileId + '' // token (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/create-file-token.md index 3788f21b59..d1409c4a99 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/create-file-token.md @@ -3,13 +3,12 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new sdk.Tokens(client); const result = await tokens.createFileToken( '', // bucketId '', // fileId - '', // expire (optional) - ["read("any")"] // permissions (optional) + '' // expire (optional) ); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/delete.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/delete.md index 7afd4e86fa..1249839f65 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/delete.md @@ -3,7 +3,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new sdk.Tokens(client); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/get.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/get.md index 5718e62861..efb2b8c1b4 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/get.md @@ -3,7 +3,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new sdk.Tokens(client); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/list.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/list.md index f0b0c0170c..8b708f270f 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/list.md @@ -3,7 +3,7 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new sdk.Tokens(client); diff --git a/docs/examples/1.7.x/server-nodejs/examples/tokens/update.md b/docs/examples/1.7.x/server-nodejs/examples/tokens/update.md index a1424c7218..ebf5aa9bf8 100644 --- a/docs/examples/1.7.x/server-nodejs/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-nodejs/examples/tokens/update.md @@ -3,12 +3,11 @@ const sdk = require('node-appwrite'); const client = new sdk.Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('') // Your project ID - .setSession(''); // The user session to authenticate with + .setKey(''); // Your secret API key const tokens = new sdk.Tokens(client); const result = await tokens.update( '', // tokenId - '', // expire (optional) - ["read("any")"] // permissions (optional) + '' // expire (optional) ); diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-php/examples/avatars/get-browser.md index c65c31dae3..2449c26032 100644 --- a/docs/examples/1.7.x/server-php/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-browser.md @@ -15,5 +15,5 @@ $result = $avatars->getBrowser( code: Browser::AVANTBROWSER(), width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-php/examples/avatars/get-credit-card.md index 1f19ee2797..123b345a43 100644 --- a/docs/examples/1.7.x/server-php/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-credit-card.md @@ -15,5 +15,5 @@ $result = $avatars->getCreditCard( code: CreditCard::AMERICANEXPRESS(), width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-php/examples/avatars/get-flag.md index 8ffb39c30e..5b7d8babc7 100644 --- a/docs/examples/1.7.x/server-php/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-php/examples/avatars/get-flag.md @@ -15,5 +15,5 @@ $result = $avatars->getFlag( code: Flag::AFGHANISTAN(), width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/databases/create-index.md b/docs/examples/1.7.x/server-php/examples/databases/create-index.md index 1d01f09cca..9e8a221e13 100644 --- a/docs/examples/1.7.x/server-php/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-php/examples/databases/create-index.md @@ -17,5 +17,6 @@ $result = $databases->createIndex( key: '', type: IndexType::KEY(), attributes: [], - orders: [] // optional + orders: [], // optional + lengths: [] // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-php/examples/storage/get-file-download.md index 8831f0da9f..defefa5948 100644 --- a/docs/examples/1.7.x/server-php/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-php/examples/storage/get-file-download.md @@ -12,5 +12,6 @@ $storage = new Storage($client); $result = $storage->getFileDownload( bucketId: '', - fileId: '' + fileId: '', + token: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-php/examples/storage/get-file-preview.md index 0c9db136b8..0b65fc326a 100644 --- a/docs/examples/1.7.x/server-php/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-php/examples/storage/get-file-preview.md @@ -16,12 +16,13 @@ $result = $storage->getFilePreview( width: 0, // optional height: 0, // optional gravity: ImageGravity::CENTER(), // optional - quality: 0, // optional + quality: -1, // optional borderWidth: 0, // optional borderColor: '', // optional borderRadius: 0, // optional opacity: 0, // optional rotation: -360, // optional background: '', // optional - output: ImageFormat::JPG() // optional + output: ImageFormat::JPG(), // optional + token: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-php/examples/storage/get-file-view.md index 95a32bd3c2..dfc84ca102 100644 --- a/docs/examples/1.7.x/server-php/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-php/examples/storage/get-file-view.md @@ -12,5 +12,6 @@ $storage = new Storage($client); $result = $storage->getFileView( bucketId: '', - fileId: '' + fileId: '', + token: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-php/examples/tokens/create-file-token.md index d2a6cd64fe..e4f230217a 100644 --- a/docs/examples/1.7.x/server-php/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-php/examples/tokens/create-file-token.md @@ -6,13 +6,12 @@ use Appwrite\Services\Tokens; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('') // Your project ID - ->setSession(''); // The user session to authenticate with + ->setKey(''); // Your secret API key $tokens = new Tokens($client); $result = $tokens->createFileToken( bucketId: '', fileId: '', - expire: '', // optional - permissions: ["read("any")"] // optional + expire: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-php/examples/tokens/delete.md b/docs/examples/1.7.x/server-php/examples/tokens/delete.md index dac7da1705..278be90b12 100644 --- a/docs/examples/1.7.x/server-php/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-php/examples/tokens/delete.md @@ -6,7 +6,7 @@ use Appwrite\Services\Tokens; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('') // Your project ID - ->setSession(''); // The user session to authenticate with + ->setKey(''); // Your secret API key $tokens = new Tokens($client); diff --git a/docs/examples/1.7.x/server-php/examples/tokens/get.md b/docs/examples/1.7.x/server-php/examples/tokens/get.md index 377bccc830..e7b4e1081b 100644 --- a/docs/examples/1.7.x/server-php/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-php/examples/tokens/get.md @@ -6,7 +6,7 @@ use Appwrite\Services\Tokens; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('') // Your project ID - ->setSession(''); // The user session to authenticate with + ->setKey(''); // Your secret API key $tokens = new Tokens($client); diff --git a/docs/examples/1.7.x/server-php/examples/tokens/list.md b/docs/examples/1.7.x/server-php/examples/tokens/list.md index 658a1d311f..b89420bed1 100644 --- a/docs/examples/1.7.x/server-php/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-php/examples/tokens/list.md @@ -6,7 +6,7 @@ use Appwrite\Services\Tokens; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('') // Your project ID - ->setSession(''); // The user session to authenticate with + ->setKey(''); // Your secret API key $tokens = new Tokens($client); diff --git a/docs/examples/1.7.x/server-php/examples/tokens/update.md b/docs/examples/1.7.x/server-php/examples/tokens/update.md index 7f238ea1ee..ea95322a43 100644 --- a/docs/examples/1.7.x/server-php/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-php/examples/tokens/update.md @@ -6,12 +6,11 @@ use Appwrite\Services\Tokens; $client = (new Client()) ->setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint ->setProject('') // Your project ID - ->setSession(''); // The user session to authenticate with + ->setKey(''); // Your secret API key $tokens = new Tokens($client); $result = $tokens->update( tokenId: '', - expire: '', // optional - permissions: ["read("any")"] // optional + expire: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-python/examples/avatars/get-browser.md index c7ae77f082..ff11b8b46f 100644 --- a/docs/examples/1.7.x/server-python/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-browser.md @@ -13,5 +13,5 @@ result = avatars.get_browser( code = Browser.AVANT_BROWSER, width = 0, # optional height = 0, # optional - quality = 0 # optional + quality = -1 # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-python/examples/avatars/get-credit-card.md index 160636de7e..286f4d346c 100644 --- a/docs/examples/1.7.x/server-python/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-credit-card.md @@ -13,5 +13,5 @@ result = avatars.get_credit_card( code = CreditCard.AMERICAN_EXPRESS, width = 0, # optional height = 0, # optional - quality = 0 # optional + quality = -1 # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-python/examples/avatars/get-flag.md index 844dbb6a25..6365a78b47 100644 --- a/docs/examples/1.7.x/server-python/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-python/examples/avatars/get-flag.md @@ -13,5 +13,5 @@ result = avatars.get_flag( code = Flag.AFGHANISTAN, width = 0, # optional height = 0, # optional - quality = 0 # optional + quality = -1 # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/databases/create-index.md b/docs/examples/1.7.x/server-python/examples/databases/create-index.md index fe78b5e152..f7bb455d07 100644 --- a/docs/examples/1.7.x/server-python/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-python/examples/databases/create-index.md @@ -15,5 +15,6 @@ result = databases.create_index( key = '', type = IndexType.KEY, attributes = [], - orders = [] # optional + orders = [], # optional + lengths = [] # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-python/examples/storage/get-file-download.md index d21db6304a..411abf8c79 100644 --- a/docs/examples/1.7.x/server-python/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-python/examples/storage/get-file-download.md @@ -10,5 +10,6 @@ storage = Storage(client) result = storage.get_file_download( bucket_id = '', - file_id = '' + file_id = '', + token = '' # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-python/examples/storage/get-file-preview.md index 20939b20b4..47e3f23b55 100644 --- a/docs/examples/1.7.x/server-python/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-python/examples/storage/get-file-preview.md @@ -14,12 +14,13 @@ result = storage.get_file_preview( width = 0, # optional height = 0, # optional gravity = ImageGravity.CENTER, # optional - quality = 0, # optional + quality = -1, # optional border_width = 0, # optional border_color = '', # optional border_radius = 0, # optional opacity = 0, # optional rotation = -360, # optional background = '', # optional - output = ImageFormat.JPG # optional + output = ImageFormat.JPG, # optional + token = '' # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-python/examples/storage/get-file-view.md index bf70d136e2..85cbad7902 100644 --- a/docs/examples/1.7.x/server-python/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-python/examples/storage/get-file-view.md @@ -10,5 +10,6 @@ storage = Storage(client) result = storage.get_file_view( bucket_id = '', - file_id = '' + file_id = '', + token = '' # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-python/examples/tokens/create-file-token.md index e719c5dd3e..f835a0ea8d 100644 --- a/docs/examples/1.7.x/server-python/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-python/examples/tokens/create-file-token.md @@ -4,13 +4,12 @@ from appwrite.services.tokens import Tokens client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID -client.set_session('') # The user session to authenticate with +client.set_key('') # Your secret API key tokens = Tokens(client) result = tokens.create_file_token( bucket_id = '', file_id = '', - expire = '', # optional - permissions = ["read("any")"] # optional + expire = '' # optional ) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/delete.md b/docs/examples/1.7.x/server-python/examples/tokens/delete.md index f74e0aa815..47619321ff 100644 --- a/docs/examples/1.7.x/server-python/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-python/examples/tokens/delete.md @@ -4,7 +4,7 @@ from appwrite.services.tokens import Tokens client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID -client.set_session('') # The user session to authenticate with +client.set_key('') # Your secret API key tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/get.md b/docs/examples/1.7.x/server-python/examples/tokens/get.md index 06d0a7f71a..0d6abb81d7 100644 --- a/docs/examples/1.7.x/server-python/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-python/examples/tokens/get.md @@ -4,7 +4,7 @@ from appwrite.services.tokens import Tokens client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID -client.set_session('') # The user session to authenticate with +client.set_key('') # Your secret API key tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/list.md b/docs/examples/1.7.x/server-python/examples/tokens/list.md index cb2ee77296..2694650ed3 100644 --- a/docs/examples/1.7.x/server-python/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-python/examples/tokens/list.md @@ -4,7 +4,7 @@ from appwrite.services.tokens import Tokens client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID -client.set_session('') # The user session to authenticate with +client.set_key('') # Your secret API key tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-python/examples/tokens/update.md b/docs/examples/1.7.x/server-python/examples/tokens/update.md index 0c21c3adb1..18b04445cc 100644 --- a/docs/examples/1.7.x/server-python/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-python/examples/tokens/update.md @@ -4,12 +4,11 @@ from appwrite.services.tokens import Tokens client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint client.set_project('') # Your project ID -client.set_session('') # The user session to authenticate with +client.set_key('') # Your secret API key tokens = Tokens(client) result = tokens.update( token_id = '', - expire = '', # optional - permissions = ["read("any")"] # optional + expire = '' # optional ) diff --git a/docs/examples/1.7.x/server-rest/examples/databases/create-index.md b/docs/examples/1.7.x/server-rest/examples/databases/create-index.md index f90876934b..6d9b486ed6 100644 --- a/docs/examples/1.7.x/server-rest/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-rest/examples/databases/create-index.md @@ -9,5 +9,6 @@ X-Appwrite-Key: "key": , "type": "key", "attributes": [], - "orders": [] + "orders": [], + "lengths": [] } diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-rest/examples/tokens/create-file-token.md index 4e67197c36..c1fbb63d2d 100644 --- a/docs/examples/1.7.x/server-rest/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-rest/examples/tokens/create-file-token.md @@ -3,11 +3,8 @@ Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: -X-Appwrite-Session: X-Appwrite-Key: -X-Appwrite-JWT: { - "expire": , - "permissions": ["read(\"any\")"] + "expire": } diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/delete.md b/docs/examples/1.7.x/server-rest/examples/tokens/delete.md index e869bd60bd..ee564b01c4 100644 --- a/docs/examples/1.7.x/server-rest/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-rest/examples/tokens/delete.md @@ -3,7 +3,5 @@ Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: -X-Appwrite-Session: X-Appwrite-Key: -X-Appwrite-JWT: diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/get.md b/docs/examples/1.7.x/server-rest/examples/tokens/get.md index 159e9741b4..b39c8390e3 100644 --- a/docs/examples/1.7.x/server-rest/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-rest/examples/tokens/get.md @@ -2,6 +2,4 @@ GET /v1/tokens/{tokenId} HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: -X-Appwrite-Session: X-Appwrite-Key: -X-Appwrite-JWT: diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/list.md b/docs/examples/1.7.x/server-rest/examples/tokens/list.md index 2e34068137..8909d05572 100644 --- a/docs/examples/1.7.x/server-rest/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-rest/examples/tokens/list.md @@ -2,6 +2,4 @@ GET /v1/tokens/buckets/{bucketId}/files/{fileId} HTTP/1.1 Host: cloud.appwrite.io X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: -X-Appwrite-Session: X-Appwrite-Key: -X-Appwrite-JWT: diff --git a/docs/examples/1.7.x/server-rest/examples/tokens/update.md b/docs/examples/1.7.x/server-rest/examples/tokens/update.md index 14d6144e95..8ab9d60555 100644 --- a/docs/examples/1.7.x/server-rest/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-rest/examples/tokens/update.md @@ -3,11 +3,8 @@ Host: cloud.appwrite.io Content-Type: application/json X-Appwrite-Response-Format: 1.7.0 X-Appwrite-Project: -X-Appwrite-Session: X-Appwrite-Key: -X-Appwrite-JWT: { - "expire": , - "permissions": ["read(\"any\")"] + "expire": } diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-browser.md index 4afdf779a4..36354d1dce 100644 --- a/docs/examples/1.7.x/server-ruby/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-browser.md @@ -14,5 +14,5 @@ result = avatars.get_browser( code: Browser::AVANT_BROWSER, width: 0, # optional height: 0, # optional - quality: 0 # optional + quality: -1 # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-credit-card.md index a324f6db75..09a0245034 100644 --- a/docs/examples/1.7.x/server-ruby/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-credit-card.md @@ -14,5 +14,5 @@ result = avatars.get_credit_card( code: CreditCard::AMERICAN_EXPRESS, width: 0, # optional height: 0, # optional - quality: 0 # optional + quality: -1 # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-ruby/examples/avatars/get-flag.md index f648a285d1..61b7793048 100644 --- a/docs/examples/1.7.x/server-ruby/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-ruby/examples/avatars/get-flag.md @@ -14,5 +14,5 @@ result = avatars.get_flag( code: Flag::AFGHANISTAN, width: 0, # optional height: 0, # optional - quality: 0 # optional + quality: -1 # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/databases/create-index.md b/docs/examples/1.7.x/server-ruby/examples/databases/create-index.md index e75478dea2..18c2f0ee6a 100644 --- a/docs/examples/1.7.x/server-ruby/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-ruby/examples/databases/create-index.md @@ -16,5 +16,6 @@ result = databases.create_index( key: '', type: IndexType::KEY, attributes: [], - orders: [] # optional + orders: [], # optional + lengths: [] # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-download.md index 0747fdf04b..7b7075184a 100644 --- a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-download.md @@ -11,5 +11,6 @@ storage = Storage.new(client) result = storage.get_file_download( bucket_id: '', - file_id: '' + file_id: '', + token: '' # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-preview.md index 38a68a8c8b..23254615d3 100644 --- a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-preview.md @@ -15,12 +15,13 @@ result = storage.get_file_preview( width: 0, # optional height: 0, # optional gravity: ImageGravity::CENTER, # optional - quality: 0, # optional + quality: -1, # optional border_width: 0, # optional border_color: '', # optional border_radius: 0, # optional opacity: 0, # optional rotation: -360, # optional background: '', # optional - output: ImageFormat::JPG # optional + output: ImageFormat::JPG, # optional + token: '' # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-view.md index 4c31305ecd..c9e9952f05 100644 --- a/docs/examples/1.7.x/server-ruby/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-ruby/examples/storage/get-file-view.md @@ -11,5 +11,6 @@ storage = Storage.new(client) result = storage.get_file_view( bucket_id: '', - file_id: '' + file_id: '', + token: '' # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-ruby/examples/tokens/create-file-token.md index ae4601d4a4..8c432c5255 100644 --- a/docs/examples/1.7.x/server-ruby/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/create-file-token.md @@ -5,13 +5,12 @@ include Appwrite client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint .set_project('') # Your project ID - .set_session('') # The user session to authenticate with + .set_key('') # Your secret API key tokens = Tokens.new(client) result = tokens.create_file_token( bucket_id: '', file_id: '', - expire: '', # optional - permissions: ["read("any")"] # optional + expire: '' # optional ) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/delete.md b/docs/examples/1.7.x/server-ruby/examples/tokens/delete.md index 0a13925e20..cb59147f42 100644 --- a/docs/examples/1.7.x/server-ruby/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/delete.md @@ -5,7 +5,7 @@ include Appwrite client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint .set_project('') # Your project ID - .set_session('') # The user session to authenticate with + .set_key('') # Your secret API key tokens = Tokens.new(client) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/get.md b/docs/examples/1.7.x/server-ruby/examples/tokens/get.md index 3f55ab24ed..ef87c74294 100644 --- a/docs/examples/1.7.x/server-ruby/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/get.md @@ -5,7 +5,7 @@ include Appwrite client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint .set_project('') # Your project ID - .set_session('') # The user session to authenticate with + .set_key('') # Your secret API key tokens = Tokens.new(client) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/list.md b/docs/examples/1.7.x/server-ruby/examples/tokens/list.md index 63e8b2d0f8..4932f04151 100644 --- a/docs/examples/1.7.x/server-ruby/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/list.md @@ -5,7 +5,7 @@ include Appwrite client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint .set_project('') # Your project ID - .set_session('') # The user session to authenticate with + .set_key('') # Your secret API key tokens = Tokens.new(client) diff --git a/docs/examples/1.7.x/server-ruby/examples/tokens/update.md b/docs/examples/1.7.x/server-ruby/examples/tokens/update.md index f6a1fa4023..91713730fb 100644 --- a/docs/examples/1.7.x/server-ruby/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-ruby/examples/tokens/update.md @@ -5,12 +5,11 @@ include Appwrite client = Client.new .set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint .set_project('') # Your project ID - .set_session('') # The user session to authenticate with + .set_key('') # Your secret API key tokens = Tokens.new(client) result = tokens.update( token_id: '', - expire: '', # optional - permissions: ["read("any")"] # optional + expire: '' # optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-browser.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-browser.md index 7db84f1ba2..1c105c280c 100644 --- a/docs/examples/1.7.x/server-swift/examples/avatars/get-browser.md +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-browser.md @@ -12,6 +12,6 @@ let bytes = try await avatars.getBrowser( code: .avantBrowser, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-credit-card.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-credit-card.md index aa9bafd2c3..af7c2800be 100644 --- a/docs/examples/1.7.x/server-swift/examples/avatars/get-credit-card.md +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-credit-card.md @@ -12,6 +12,6 @@ let bytes = try await avatars.getCreditCard( code: .americanExpress, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/avatars/get-flag.md b/docs/examples/1.7.x/server-swift/examples/avatars/get-flag.md index c276572ce9..e33cbb0c7f 100644 --- a/docs/examples/1.7.x/server-swift/examples/avatars/get-flag.md +++ b/docs/examples/1.7.x/server-swift/examples/avatars/get-flag.md @@ -12,6 +12,6 @@ let bytes = try await avatars.getFlag( code: .afghanistan, width: 0, // optional height: 0, // optional - quality: 0 // optional + quality: -1 // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/databases/create-index.md b/docs/examples/1.7.x/server-swift/examples/databases/create-index.md index 11cbc17982..7e9a6205d7 100644 --- a/docs/examples/1.7.x/server-swift/examples/databases/create-index.md +++ b/docs/examples/1.7.x/server-swift/examples/databases/create-index.md @@ -14,6 +14,7 @@ let index = try await databases.createIndex( key: "", type: .key, attributes: [], - orders: [] // optional + orders: [], // optional + lengths: [] // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-file-download.md b/docs/examples/1.7.x/server-swift/examples/storage/get-file-download.md index 5893cefad1..b362b08cda 100644 --- a/docs/examples/1.7.x/server-swift/examples/storage/get-file-download.md +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-file-download.md @@ -9,6 +9,7 @@ let storage = Storage(client) let bytes = try await storage.getFileDownload( bucketId: "", - fileId: "" + fileId: "", + token: "" // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-file-preview.md b/docs/examples/1.7.x/server-swift/examples/storage/get-file-preview.md index 874e5675e4..d8c2380b7d 100644 --- a/docs/examples/1.7.x/server-swift/examples/storage/get-file-preview.md +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-file-preview.md @@ -14,13 +14,14 @@ let bytes = try await storage.getFilePreview( width: 0, // optional height: 0, // optional gravity: .center, // optional - quality: 0, // optional + quality: -1, // optional borderWidth: 0, // optional borderColor: "", // optional borderRadius: 0, // optional opacity: 0, // optional rotation: -360, // optional background: "", // optional - output: .jpg // optional + output: .jpg, // optional + token: "" // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/storage/get-file-view.md b/docs/examples/1.7.x/server-swift/examples/storage/get-file-view.md index 4cf7e7d996..a3b94eec45 100644 --- a/docs/examples/1.7.x/server-swift/examples/storage/get-file-view.md +++ b/docs/examples/1.7.x/server-swift/examples/storage/get-file-view.md @@ -9,6 +9,7 @@ let storage = Storage(client) let bytes = try await storage.getFileView( bucketId: "", - fileId: "" + fileId: "", + token: "" // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/create-file-token.md b/docs/examples/1.7.x/server-swift/examples/tokens/create-file-token.md index 511bc8e660..2bdc123b61 100644 --- a/docs/examples/1.7.x/server-swift/examples/tokens/create-file-token.md +++ b/docs/examples/1.7.x/server-swift/examples/tokens/create-file-token.md @@ -3,14 +3,13 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key let tokens = Tokens(client) let resourceToken = try await tokens.createFileToken( bucketId: "", fileId: "", - expire: "", // optional - permissions: ["read("any")"] // optional + expire: "" // optional ) diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/delete.md b/docs/examples/1.7.x/server-swift/examples/tokens/delete.md index 42d4e81163..8b4db1435d 100644 --- a/docs/examples/1.7.x/server-swift/examples/tokens/delete.md +++ b/docs/examples/1.7.x/server-swift/examples/tokens/delete.md @@ -3,7 +3,7 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key let tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/get.md b/docs/examples/1.7.x/server-swift/examples/tokens/get.md index 79f32e16d4..d6eac81059 100644 --- a/docs/examples/1.7.x/server-swift/examples/tokens/get.md +++ b/docs/examples/1.7.x/server-swift/examples/tokens/get.md @@ -3,7 +3,7 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key let tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/list.md b/docs/examples/1.7.x/server-swift/examples/tokens/list.md index 96e8bd2de3..8438050754 100644 --- a/docs/examples/1.7.x/server-swift/examples/tokens/list.md +++ b/docs/examples/1.7.x/server-swift/examples/tokens/list.md @@ -3,7 +3,7 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key let tokens = Tokens(client) diff --git a/docs/examples/1.7.x/server-swift/examples/tokens/update.md b/docs/examples/1.7.x/server-swift/examples/tokens/update.md index e852b73db8..14bcb30f78 100644 --- a/docs/examples/1.7.x/server-swift/examples/tokens/update.md +++ b/docs/examples/1.7.x/server-swift/examples/tokens/update.md @@ -3,13 +3,12 @@ import Appwrite let client = Client() .setEndpoint("https://.cloud.appwrite.io/v1") // Your API Endpoint .setProject("") // Your project ID - .setSession("") // The user session to authenticate with + .setKey("") // Your secret API key let tokens = Tokens(client) let resourceToken = try await tokens.update( tokenId: "", - expire: "", // optional - permissions: ["read("any")"] // optional + expire: "" // optional )