diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 0409fd9009..55be1565b7 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4641,6 +4641,205 @@ } } } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, If none are submitted then all documents are updated. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "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.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "{documentId}", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "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.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } } }, "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { @@ -4863,7 +5062,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -4949,7 +5148,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -5037,7 +5236,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5154,7 +5353,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5230,7 +5429,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5284,7 +5483,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5338,7 +5537,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5392,7 +5591,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5446,7 +5645,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5500,7 +5699,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5554,7 +5753,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5608,7 +5807,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5662,7 +5861,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5716,7 +5915,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5770,7 +5969,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -5855,7 +6054,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -5932,7 +6131,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -6020,7 +6219,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -6120,7 +6319,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -6194,7 +6393,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6285,7 +6484,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6354,7 +6553,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6423,7 +6622,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6641,7 +6840,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6717,7 +6916,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6795,7 +6994,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6882,7 +7081,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6946,7 +7145,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7022,7 +7221,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7088,7 +7287,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7176,7 +7375,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7289,7 +7488,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7363,7 +7562,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7452,7 +7651,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7528,7 +7727,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7628,7 +7827,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7691,7 +7890,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 2925ddd4ce..a98e06dc69 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4465,7 +4465,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4534,7 +4534,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4740,7 +4740,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 114, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8210,6 +8210,205 @@ } } } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, If none are submitted then all documents are updated. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "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.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "{documentId}", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "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.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } } }, "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { @@ -8432,7 +8631,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -9059,7 +9258,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 116, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -9228,7 +9427,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 115, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9312,7 +9511,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9387,7 +9586,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9492,7 +9691,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9635,7 +9835,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9686,7 +9886,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9738,7 +9938,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -9840,7 +10040,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -9902,7 +10102,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 294, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -9976,7 +10176,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10037,7 +10237,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10149,7 +10349,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -10262,7 +10463,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10325,7 +10526,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10410,7 +10611,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10508,7 +10709,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10579,7 +10780,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10643,7 +10844,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10709,7 +10910,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10796,7 +10997,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10862,7 +11063,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -10937,7 +11138,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11025,7 +11226,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11142,7 +11343,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11209,7 +11410,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11282,7 +11483,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -11366,7 +11567,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11427,7 +11628,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11515,7 +11716,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11586,7 +11787,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11674,7 +11875,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11747,7 +11948,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -11801,7 +12002,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -11855,7 +12056,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -11906,7 +12107,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -11957,7 +12158,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12008,7 +12209,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12070,7 +12271,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12121,7 +12322,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12172,7 +12373,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12223,7 +12424,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12287,7 +12488,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12351,7 +12552,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12426,7 +12627,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12490,7 +12691,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12580,7 +12781,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12644,7 +12845,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12708,7 +12909,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12772,7 +12973,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12836,7 +13037,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12900,7 +13101,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12964,7 +13165,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13028,7 +13229,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -13092,7 +13293,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13143,7 +13344,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13194,7 +13395,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -13245,7 +13446,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13299,7 +13500,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13353,7 +13554,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13407,7 +13608,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13461,7 +13662,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13515,7 +13716,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13569,7 +13770,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13623,7 +13824,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13677,7 +13878,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13755,7 +13956,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13901,7 +14102,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14049,7 +14250,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14206,7 +14407,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 396, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -14365,7 +14566,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -14476,7 +14677,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14590,7 +14791,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -14645,7 +14846,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -14709,7 +14910,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14786,7 +14987,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14863,7 +15064,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14941,7 +15142,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15048,7 +15249,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -15158,7 +15359,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15245,7 +15446,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -15335,7 +15536,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15452,7 +15653,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15572,7 +15773,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -15669,7 +15870,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15769,7 +15970,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15876,7 +16077,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15986,7 +16187,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16131,7 +16332,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16278,7 +16479,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16375,7 +16576,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16475,7 +16676,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16572,7 +16773,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16672,7 +16873,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -16769,7 +16970,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16869,7 +17070,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -16966,7 +17167,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17066,7 +17267,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -17121,7 +17322,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17185,7 +17386,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -17262,7 +17463,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -17339,7 +17540,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17415,7 +17616,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17500,7 +17701,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17562,7 +17763,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17641,7 +17842,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17705,7 +17906,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17782,7 +17983,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -17868,7 +18069,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -17960,7 +18161,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -18025,7 +18226,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -18102,7 +18303,7 @@ }, "x-appwrite": { "method": "list", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18178,7 +18379,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18268,7 +18469,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18363,7 +18564,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18434,7 +18635,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -18484,7 +18685,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -18562,7 +18763,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -18612,7 +18813,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 342, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -18686,7 +18887,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 343, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -18760,7 +18961,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -18873,7 +19074,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19008,7 +19209,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -19115,7 +19316,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19241,7 +19442,7 @@ }, "x-appwrite": { "method": "get", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -19301,7 +19502,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -19354,7 +19555,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -19416,7 +19617,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19506,7 +19707,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19554,7 +19755,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19629,7 +19830,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19689,7 +19890,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19766,7 +19967,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19828,7 +20029,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -19902,7 +20103,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20039,7 +20240,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20099,7 +20300,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20216,7 +20417,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20278,7 +20479,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20372,7 +20573,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -20453,7 +20654,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20534,7 +20735,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -20615,7 +20816,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20696,7 +20897,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20789,7 +20990,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -20873,7 +21074,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20954,7 +21155,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21035,7 +21236,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21116,7 +21317,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -21197,7 +21398,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -21299,7 +21500,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21388,7 +21589,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21448,7 +21649,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21543,7 +21744,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21613,7 +21814,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21709,7 +21910,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21781,7 +21982,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -21920,7 +22121,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21980,7 +22181,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22101,7 +22302,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22171,7 +22372,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22268,7 +22469,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22340,7 +22541,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -22442,7 +22643,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -22523,7 +22724,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22643,7 +22844,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22776,7 +22977,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -22857,7 +23058,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23083,7 +23284,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23349,7 +23550,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23577,7 +23778,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23800,7 +24001,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24042,7 +24243,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24267,7 +24468,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24327,7 +24528,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24444,7 +24645,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24514,7 +24715,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24632,7 +24833,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -24704,7 +24905,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -24776,7 +24977,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -24850,7 +25051,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -24936,7 +25137,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -24989,7 +25190,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 319, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -25051,7 +25252,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 320, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -25113,7 +25314,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25188,7 +25389,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25317,7 +25518,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25378,7 +25579,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -25504,7 +25705,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -25567,7 +25768,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25655,7 +25856,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -25755,7 +25956,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -25829,7 +26030,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -25920,7 +26121,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -25989,7 +26190,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -26058,7 +26259,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26276,7 +26477,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -26352,7 +26553,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -26426,7 +26627,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -26510,7 +26711,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -26588,7 +26789,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -26675,7 +26876,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -26739,7 +26940,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -26815,7 +27016,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -26881,7 +27082,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -26956,7 +27157,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27044,7 +27245,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27157,7 +27358,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27231,7 +27432,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27320,7 +27521,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -27396,7 +27597,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -27495,7 +27696,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -27557,7 +27758,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -27640,7 +27841,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -27715,7 +27916,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -27805,7 +28006,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -27892,7 +28093,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -27979,7 +28180,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -28049,7 +28250,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -28112,7 +28313,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -28199,7 +28400,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28286,7 +28487,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -28403,7 +28604,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -28508,7 +28709,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -28615,7 +28816,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -28689,7 +28890,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -28743,7 +28944,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -28806,7 +29007,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -28888,7 +29089,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -28972,7 +29173,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -29057,7 +29258,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -29133,7 +29334,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -29196,7 +29397,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29278,7 +29479,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -29356,7 +29557,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -29419,7 +29620,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -29480,7 +29681,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -29541,7 +29742,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -29604,7 +29805,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -29686,7 +29887,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -29768,7 +29969,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -29850,7 +30051,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -29911,7 +30112,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -29993,7 +30194,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -30054,7 +30255,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30108,7 +30309,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -30164,7 +30365,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -30237,7 +30438,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30319,7 +30520,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30394,7 +30595,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -30506,7 +30707,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -30578,7 +30779,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -30669,7 +30870,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -30743,7 +30944,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30827,7 +31028,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -30909,7 +31110,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -30991,7 +31192,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31062,7 +31263,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31149,7 +31350,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -31221,7 +31422,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -31293,7 +31494,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -31376,7 +31577,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31457,7 +31658,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -31548,7 +31749,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -31624,7 +31825,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -31677,7 +31878,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 20e95362fb..2c1e276c07 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -7739,6 +7739,209 @@ } } } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, If none are submitted then all documents are updated. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", + "x-example": "[\"read(\"any\")\"]", + "items": { + "type": "string" + } + }, + "queries": { + "type": "array", + "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.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "{documentId}", + "offline-response-key": "$id", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "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.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } } }, "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { @@ -7965,7 +8168,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8418,7 +8621,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8494,7 +8697,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8600,7 +8803,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -8743,7 +8947,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8795,7 +8999,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8848,7 +9052,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -8910,7 +9114,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9023,7 +9227,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9136,7 +9341,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9200,7 +9405,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9286,7 +9491,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9385,7 +9590,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9457,7 +9662,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9522,7 +9727,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9589,7 +9794,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9677,7 +9882,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9744,7 +9949,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -9820,7 +10025,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -9910,7 +10115,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10029,7 +10234,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10098,7 +10303,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10172,7 +10377,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10234,7 +10439,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10323,7 +10528,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10395,7 +10600,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10484,7 +10689,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10558,7 +10763,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10614,7 +10819,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10670,7 +10875,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10722,7 +10927,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -10774,7 +10979,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -10826,7 +11031,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10889,7 +11094,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -10941,7 +11146,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -10993,7 +11198,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11045,7 +11250,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11110,7 +11315,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11175,7 +11380,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11251,7 +11456,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11316,7 +11521,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -11407,7 +11612,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11472,7 +11677,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11537,7 +11742,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11602,7 +11807,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11667,7 +11872,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11732,7 +11937,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11797,7 +12002,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11862,7 +12067,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11927,7 +12132,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11979,7 +12184,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12031,7 +12236,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12083,7 +12288,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12139,7 +12344,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12195,7 +12400,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12251,7 +12456,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12307,7 +12512,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12363,7 +12568,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12419,7 +12624,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12475,7 +12680,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12531,7 +12736,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -12610,7 +12815,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -12757,7 +12962,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -12906,7 +13111,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13064,7 +13269,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 396, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -13224,7 +13429,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13336,7 +13541,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13451,7 +13656,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13507,7 +13712,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -13572,7 +13777,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13650,7 +13855,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -13728,7 +13933,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -13807,7 +14012,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -13915,7 +14120,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14026,7 +14231,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14114,7 +14319,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -14205,7 +14410,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14323,7 +14528,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -14444,7 +14649,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14542,7 +14747,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -14643,7 +14848,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14751,7 +14956,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -14862,7 +15067,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15008,7 +15213,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15156,7 +15361,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -15254,7 +15459,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15355,7 +15560,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15453,7 +15658,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15554,7 +15759,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15652,7 +15857,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15753,7 +15958,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15851,7 +16056,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -15952,7 +16157,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16008,7 +16213,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16073,7 +16278,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -16151,7 +16356,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -16229,7 +16434,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16306,7 +16511,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16392,7 +16597,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16455,7 +16660,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16535,7 +16740,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -16600,7 +16805,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16678,7 +16883,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -16765,7 +16970,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -16859,7 +17064,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -16925,7 +17130,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -17004,7 +17209,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17080,7 +17285,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17210,7 +17415,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17272,7 +17477,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -17399,7 +17604,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17463,7 +17668,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -17553,7 +17758,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -17655,7 +17860,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -17731,7 +17936,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -17824,7 +18029,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -17895,7 +18100,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -17966,7 +18171,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18186,7 +18391,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -18264,7 +18469,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -18344,7 +18549,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18433,7 +18638,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -18499,7 +18704,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -18577,7 +18782,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18645,7 +18850,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -18735,7 +18940,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18850,7 +19055,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -18926,7 +19131,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19017,7 +19222,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19095,7 +19300,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -19196,7 +19401,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19260,7 +19465,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19345,7 +19550,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -19421,7 +19626,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -19512,7 +19717,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -19600,7 +19805,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19688,7 +19893,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -19759,7 +19964,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -19823,7 +20028,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -19911,7 +20116,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -19999,7 +20204,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -20117,7 +20322,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -20223,7 +20428,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20331,7 +20536,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -20386,7 +20591,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20450,7 +20655,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -20533,7 +20738,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20618,7 +20823,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -20704,7 +20909,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20781,7 +20986,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -20845,7 +21050,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -20928,7 +21133,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -21007,7 +21212,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21071,7 +21276,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21133,7 +21338,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21195,7 +21400,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21259,7 +21464,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21342,7 +21547,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21425,7 +21630,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -21508,7 +21713,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -21570,7 +21775,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -21653,7 +21858,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21715,7 +21920,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21770,7 +21975,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21827,7 +22032,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -21901,7 +22106,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -21984,7 +22189,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -22060,7 +22265,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22173,7 +22378,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -22246,7 +22451,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22338,7 +22543,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -22413,7 +22618,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -22498,7 +22703,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22581,7 +22786,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 0c9ad9aa25..8dce505cac 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4807,6 +4807,201 @@ } } ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, If none are submitted then all documents are updated. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. 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" + } + }, + "queries": { + "type": "array", + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "{documentId}", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] } }, "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { @@ -5024,7 +5219,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -5106,7 +5301,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -5191,7 +5386,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5312,7 +5507,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5386,7 +5581,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5462,7 +5657,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5538,7 +5733,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5594,7 +5789,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5650,7 +5845,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5706,7 +5901,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5762,7 +5957,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5818,7 +6013,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5874,7 +6069,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5930,7 +6125,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5986,7 +6181,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -6075,7 +6270,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -6150,7 +6345,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -6235,7 +6430,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -6329,7 +6524,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -6401,7 +6596,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6492,7 +6687,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6566,7 +6761,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6640,7 +6835,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6841,7 +7036,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6915,7 +7110,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6992,7 +7187,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -7086,7 +7281,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -7150,7 +7345,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7227,7 +7422,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7293,7 +7488,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7378,7 +7573,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7495,7 +7690,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7567,7 +7762,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7655,7 +7850,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7729,7 +7924,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7827,7 +8022,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7890,7 +8085,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 7f25544918..a09e8999fb 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4659,7 +4659,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4731,7 +4731,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4943,7 +4943,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 114, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8363,6 +8363,201 @@ } } ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, If none are submitted then all documents are updated. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. 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" + } + }, + "queries": { + "type": "array", + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "{documentId}", + "offline-response-key": "$id", + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] } }, "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { @@ -8580,7 +8775,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -9186,7 +9381,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 116, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -9350,7 +9545,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 115, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9432,7 +9627,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9506,7 +9701,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9615,7 +9810,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9778,7 +9974,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9831,7 +10027,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9885,7 +10081,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -9983,7 +10179,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -10045,7 +10241,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 294, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -10119,7 +10315,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10180,7 +10376,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10291,7 +10487,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -10422,7 +10619,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10485,7 +10682,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10567,7 +10764,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10661,7 +10858,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10730,7 +10927,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10794,7 +10991,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10860,7 +11057,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10944,7 +11141,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -11015,7 +11212,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -11088,7 +11285,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11173,7 +11370,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11294,7 +11491,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11361,7 +11558,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11432,7 +11629,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -11514,7 +11711,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11575,7 +11772,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11663,7 +11860,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11732,7 +11929,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11820,7 +12017,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11891,7 +12088,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -11967,7 +12164,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -12043,7 +12240,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12096,7 +12293,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -12149,7 +12346,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12202,7 +12399,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12264,7 +12461,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12317,7 +12514,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12370,7 +12567,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12423,7 +12620,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12487,7 +12684,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12551,7 +12748,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12624,7 +12821,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12688,7 +12885,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12776,7 +12973,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12840,7 +13037,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12904,7 +13101,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12968,7 +13165,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -13032,7 +13229,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13096,7 +13293,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13160,7 +13357,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13224,7 +13421,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -13288,7 +13485,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13341,7 +13538,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13394,7 +13591,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -13447,7 +13644,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13503,7 +13700,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13559,7 +13756,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13615,7 +13812,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13671,7 +13868,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13727,7 +13924,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13783,7 +13980,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13839,7 +14036,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13895,7 +14092,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13972,7 +14169,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14132,7 +14329,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14289,7 +14486,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14464,7 +14661,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 396, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -14636,7 +14833,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -14756,7 +14953,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14874,7 +15071,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -14933,7 +15130,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -14997,7 +15194,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -15073,7 +15270,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -15149,7 +15346,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15226,7 +15423,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15343,7 +15540,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -15458,7 +15655,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15551,7 +15748,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -15642,7 +15839,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15771,7 +15968,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15898,7 +16095,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -16003,7 +16200,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -16106,7 +16303,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -16223,7 +16420,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16338,7 +16535,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16499,7 +16696,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16657,7 +16854,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16762,7 +16959,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16865,7 +17062,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16970,7 +17167,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17073,7 +17270,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -17178,7 +17375,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -17281,7 +17478,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -17386,7 +17583,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17489,7 +17686,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -17548,7 +17745,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17612,7 +17809,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -17688,7 +17885,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -17764,7 +17961,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17839,7 +18036,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17931,7 +18128,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17993,7 +18190,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -18076,7 +18273,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -18140,7 +18337,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -18216,7 +18413,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -18299,7 +18496,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -18391,7 +18588,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -18458,7 +18655,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -18533,7 +18730,7 @@ }, "x-appwrite": { "method": "list", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18608,7 +18805,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18704,7 +18901,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18794,7 +18991,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18876,7 +19073,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -18928,7 +19125,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -19010,7 +19207,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -19062,7 +19259,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 342, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -19135,7 +19332,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 343, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -19208,7 +19405,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -19331,7 +19528,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19453,7 +19650,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -19569,7 +19766,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19684,7 +19881,7 @@ }, "x-appwrite": { "method": "get", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -19744,7 +19941,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -19799,7 +19996,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -19861,7 +20058,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19947,7 +20144,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19997,7 +20194,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -20076,7 +20273,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -20136,7 +20333,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -20215,7 +20412,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -20277,7 +20474,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20350,7 +20547,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20502,7 +20699,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20562,7 +20759,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20689,7 +20886,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20751,7 +20948,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20845,7 +21042,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -20925,7 +21122,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -21005,7 +21202,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21085,7 +21282,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -21165,7 +21362,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -21259,7 +21456,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21342,7 +21539,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21422,7 +21619,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21502,7 +21699,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21582,7 +21779,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -21662,7 +21859,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -21761,7 +21958,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21850,7 +22047,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21910,7 +22107,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -22006,7 +22203,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22074,7 +22271,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22171,7 +22368,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22241,7 +22438,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -22382,7 +22579,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22442,7 +22639,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22566,7 +22763,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22634,7 +22831,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22733,7 +22930,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22803,7 +23000,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -22905,7 +23102,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -22985,7 +23182,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23114,7 +23311,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23254,7 +23451,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -23334,7 +23531,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23556,7 +23753,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23821,7 +24018,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -24045,7 +24242,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -24264,7 +24461,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24501,7 +24698,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24722,7 +24919,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24782,7 +24979,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24904,7 +25101,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24972,7 +25169,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -25095,7 +25292,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -25165,7 +25362,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -25235,7 +25432,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -25308,7 +25505,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -25399,7 +25596,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -25454,7 +25651,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 319, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -25516,7 +25713,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 320, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -25578,7 +25775,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25652,7 +25849,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25793,7 +25990,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25854,7 +26051,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -25989,7 +26186,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -26052,7 +26249,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -26137,7 +26334,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -26231,7 +26428,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -26303,7 +26500,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -26394,7 +26591,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -26468,7 +26665,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -26542,7 +26739,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26743,7 +26940,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -26817,7 +27014,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -26891,7 +27088,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -26973,7 +27170,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -27050,7 +27247,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -27144,7 +27341,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -27208,7 +27405,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -27285,7 +27482,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -27351,7 +27548,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -27425,7 +27622,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27510,7 +27707,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27627,7 +27824,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27699,7 +27896,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27787,7 +27984,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -27861,7 +28058,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -27958,7 +28155,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -28020,7 +28217,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -28102,7 +28299,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -28176,7 +28373,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -28273,7 +28470,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -28366,7 +28563,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -28459,7 +28656,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -28530,7 +28727,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -28593,7 +28790,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -28686,7 +28883,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28779,7 +28976,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -28907,7 +29104,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -29021,7 +29218,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -29135,7 +29332,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -29209,7 +29406,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -29265,7 +29462,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -29328,7 +29525,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -29409,7 +29606,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -29493,7 +29690,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -29577,7 +29774,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -29652,7 +29849,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -29715,7 +29912,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29796,7 +29993,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -29872,7 +30069,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -29935,7 +30132,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -29996,7 +30193,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -30057,7 +30254,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -30120,7 +30317,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -30201,7 +30398,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -30282,7 +30479,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -30363,7 +30560,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -30424,7 +30621,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -30505,7 +30702,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -30566,7 +30763,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30622,7 +30819,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -30680,7 +30877,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -30751,7 +30948,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30832,7 +31029,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30906,7 +31103,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31021,7 +31218,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -31091,7 +31288,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -31185,7 +31382,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -31257,7 +31454,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -31341,7 +31538,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -31422,7 +31619,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -31503,7 +31700,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31572,7 +31769,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31659,7 +31856,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -31729,7 +31926,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -31799,7 +31996,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -31878,7 +32075,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31958,7 +32155,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -32046,7 +32243,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -32121,7 +32318,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -32176,7 +32373,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index fd41c9cf50..d0d6eb530d 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -7879,6 +7879,205 @@ } } ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, If none are submitted then all documents are updated. Using the patch method you can pass only specific fields that will get updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "", + "offline-response-key": "$id", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "permissions": { + "type": "array", + "description": "An array of permissions strings. 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" + } + }, + "queries": { + "type": "array", + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "offline-model": "\/databases\/{databaseId}\/collections\/{collectionId}\/documents", + "offline-key": "{documentId}", + "offline-response-key": "$id", + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID. You can create a new collection using the Database service [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection).", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "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.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] } }, "\/databases\/{databaseId}\/collections\/{collectionId}\/documents\/{documentId}": { @@ -8100,7 +8299,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8540,7 +8739,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8615,7 +8814,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8725,7 +8924,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -8888,7 +9088,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8942,7 +9142,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8997,7 +9197,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9059,7 +9259,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9171,7 +9371,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9302,7 +9503,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9366,7 +9567,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9449,7 +9650,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9544,7 +9745,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9614,7 +9815,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9679,7 +9880,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9746,7 +9947,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9831,7 +10032,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9903,7 +10104,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -9977,7 +10178,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10064,7 +10265,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10187,7 +10388,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10256,7 +10457,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10328,7 +10529,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10390,7 +10591,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10479,7 +10680,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10549,7 +10750,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10638,7 +10839,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10710,7 +10911,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10788,7 +10989,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10866,7 +11067,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10920,7 +11121,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -10974,7 +11175,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11028,7 +11229,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11091,7 +11292,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11145,7 +11346,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11199,7 +11400,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11253,7 +11454,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11318,7 +11519,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11383,7 +11584,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11457,7 +11658,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11522,7 +11723,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -11611,7 +11812,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11676,7 +11877,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11741,7 +11942,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11806,7 +12007,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11871,7 +12072,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11936,7 +12137,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12001,7 +12202,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12066,7 +12267,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12131,7 +12332,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12185,7 +12386,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12239,7 +12440,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12293,7 +12494,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12351,7 +12552,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12409,7 +12610,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12467,7 +12668,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12525,7 +12726,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12583,7 +12784,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12641,7 +12842,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12699,7 +12900,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12757,7 +12958,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -12835,7 +13036,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -12996,7 +13197,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 394, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -13154,7 +13355,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13330,7 +13531,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 396, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -13503,7 +13704,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13624,7 +13825,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 395, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13743,7 +13944,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 393, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13803,7 +14004,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 397, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -13868,7 +14069,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13945,7 +14146,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 392, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14022,7 +14223,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14100,7 +14301,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14218,7 +14419,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14334,7 +14535,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14428,7 +14629,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -14520,7 +14721,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14650,7 +14851,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -14778,7 +14979,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14884,7 +15085,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -14988,7 +15189,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15106,7 +15307,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15222,7 +15423,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15384,7 +15585,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15543,7 +15744,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -15649,7 +15850,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15753,7 +15954,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15859,7 +16060,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15963,7 +16164,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -16069,7 +16270,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16173,7 +16374,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -16279,7 +16480,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16383,7 +16584,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16443,7 +16644,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16508,7 +16709,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -16585,7 +16786,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -16662,7 +16863,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16738,7 +16939,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16831,7 +17032,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16894,7 +17095,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16978,7 +17179,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17043,7 +17244,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17120,7 +17321,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -17204,7 +17405,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -17298,7 +17499,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -17366,7 +17567,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -17443,7 +17644,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17518,7 +17719,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17660,7 +17861,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17722,7 +17923,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -17858,7 +18059,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17922,7 +18123,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -18009,7 +18210,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -18105,7 +18306,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -18179,7 +18380,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -18272,7 +18473,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -18348,7 +18549,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -18424,7 +18625,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18627,7 +18828,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -18703,7 +18904,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -18782,7 +18983,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18878,7 +19079,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -18944,7 +19145,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -19023,7 +19224,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -19091,7 +19292,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -19178,7 +19379,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -19297,7 +19498,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -19371,7 +19572,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19461,7 +19662,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19537,7 +19738,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -19636,7 +19837,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19700,7 +19901,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19784,7 +19985,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -19859,7 +20060,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -19957,7 +20158,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -20051,7 +20252,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -20145,7 +20346,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -20217,7 +20418,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -20281,7 +20482,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20375,7 +20576,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -20469,7 +20670,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -20598,7 +20799,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -20713,7 +20914,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20828,7 +21029,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -20885,7 +21086,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20949,7 +21150,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -21031,7 +21232,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -21116,7 +21317,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -21201,7 +21402,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -21277,7 +21478,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -21341,7 +21542,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -21423,7 +21624,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -21500,7 +21701,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21564,7 +21765,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21626,7 +21827,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21688,7 +21889,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21752,7 +21953,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21834,7 +22035,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21916,7 +22117,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -21998,7 +22199,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22060,7 +22261,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -22142,7 +22343,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -22204,7 +22405,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -22261,7 +22462,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -22320,7 +22521,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -22392,7 +22593,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -22474,7 +22675,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -22549,7 +22750,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22665,7 +22866,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -22736,7 +22937,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22831,7 +23032,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -22904,7 +23105,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -22989,7 +23190,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -23071,7 +23272,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 114fd28404..593e3b39d9 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -46,6 +46,7 @@ use Utopia\Database\Validator\Query\Offset; use Utopia\Database\Validator\Structure; use Utopia\Database\Validator\UID; use Utopia\Locale\Locale; +use Utopia\System\System; use Utopia\Validator\ArrayList; use Utopia\Validator\Boolean; use Utopia\Validator\FloatValidator; @@ -3728,6 +3729,141 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum ->setPayload($response->getPayload(), sensitive: $relationships); }); +App::patch('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('Update documents') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'documents.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'updateDocuments') + ->label('sdk.description', '/docs/references/databases/update-documents.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.response.model', Response::MODEL_DOCUMENT_LIST) + ->label('sdk.offline.model', '/databases/{databaseId}/collections/{collectionId}/documents') + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('data', [], new JSON(), 'Document data as JSON object. Include only attribute and value pairs to be updated.', true) + ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->action(function (string $databaseId, string $collectionId, string|array $data, ?array $permissions, array $queries, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Document $project) { + $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + + if (empty($data) && \is_null($permissions)) { + throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD); + } + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $queries = Query::parseQueries($queries); + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions, [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]); + + // Users can only manage their own roles, API keys and Admin users can manage any + $roles = Authorization::getRoles(); + if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); + } + } + } + } + + if (!\is_null($permissions)) { + $data['$permissions'] = $permissions; + } + $partialDocument = new Document($data); + + $documents = $dbForProject->withRequestTimestamp( + $requestTimestamp, + fn () => $dbForProject->updateDocuments( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $partialDocument, + $queries + ) + ); + + $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + foreach ($documents as $document) { + $processDocument($collection, $document); + } + + $response->dynamic(new Document([ + 'total' => \count($documents), + 'documents' => $documents + ]), Response::MODEL_DOCUMENT_LIST); + }); + App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') ->alias('/v1/database/collections/:collectionId/documents/:documentId', ['databaseId' => 'default']) ->desc('Delete document') @@ -3848,6 +3984,115 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu $response->noContent(); }); +App::delete('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('Delete documents') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'documents.delete') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT]) + ->label('sdk.namespace', 'databases') + ->label('sdk.method', 'deleteDocuments') + ->label('sdk.description', '/docs/references/databases/delete-documents.md') + ->label('sdk.response.code', Response::STATUS_CODE_OK) + ->label('sdk.response.model', Response::MODEL_DOCUMENT_LIST) + ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) + ->label('sdk.offline.model', '/databases/{databaseId}/collections/{collectionId}/documents') + ->label('sdk.offline.key', '{documentId}') + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).') + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('queueForUsage') + ->inject('project') + ->action(function (string $databaseId, string $collectionId, array $queries, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Usage $queueForUsage, Document $project) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + if ($database->isEmpty() || (!$database->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::DATABASE_NOT_FOUND); + } + + $collection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $collectionId)); + + if ($collection->isEmpty() || (!$collection->getAttribute('enabled', false) && !$isAPIKey && !$isPrivilegedUser)) { + throw new Exception(Exception::COLLECTION_NOT_FOUND); + } + + $queries = Query::parseQueries($queries); + + $documents = $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $queries) { + return $dbForProject->deleteDocuments( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $queries, + intval(System::getEnv('_APP_DATABASE_BATCH_SIZE', 10_000)) + ); + }); + + // DB Storage Calculation + $queueForUsage + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collection->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_STORAGE), 1); // per collection + + $processDocument = (function (Document $collection, Document &$document) use (&$processDocument, $dbForProject, $database): bool { + if ($document->isEmpty()) { + return false; + } + + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $relations = [$related]; + } else { + $relations = $related; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip(fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId)); + + foreach ($relations as $index => $doc) { + if ($doc instanceof Document) { + if (!$processDocument($relatedCollection, $doc)) { + unset($relations[$index]); + } + } + } + + if (\is_array($related)) { + $document->setAttribute($relationship->getAttribute('key'), \array_values($relations)); + } elseif (empty($relations)) { + $document->setAttribute($relationship->getAttribute('key'), null); + } + } + + return true; + }); + + $response->dynamic(new Document([ + 'total' => \count($documents), + 'documents' => $documents, + ]), Response::MODEL_DOCUMENT_LIST); + }); + App::get('/v1/databases/usage') ->desc('Get databases usage stats') ->groups(['api', 'database', 'usage']) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index d7b4566d90..a49ad11a10 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -90,6 +90,7 @@ $eventDatabaseListener = function (Document $document, Response $response, Event $usageDatabaseListener = function (string $event, Document $document, Usage $queueForUsage) { $value = 1; + if ($event === Database::EVENT_DOCUMENT_DELETE) { $value = -1; } diff --git a/composer.lock b/composer.lock index be7dd88f82..f5a7dd7906 100644 --- a/composer.lock +++ b/composer.lock @@ -8558,7 +8558,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/docs/references/databases/delete-documents.md b/docs/references/databases/delete-documents.md new file mode 100644 index 0000000000..a7b05503de --- /dev/null +++ b/docs/references/databases/delete-documents.md @@ -0,0 +1 @@ +Bulk delete documents using queries, if no queries are passed then all documents are deleted. \ No newline at end of file diff --git a/docs/references/databases/update-documents.md b/docs/references/databases/update-documents.md new file mode 100644 index 0000000000..f04ec420f8 --- /dev/null +++ b/docs/references/databases/update-documents.md @@ -0,0 +1 @@ +Update all documents that match your queries, If none are submitted then all documents are updated. Using the patch method you can pass only specific fields that will get updated. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000..6ab33b14fe --- /dev/null +++ b/package-lock.json @@ -0,0 +1,10 @@ +{ + "name": "@appwrite.io/repo", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@appwrite.io/repo" + } + } +} diff --git a/src/Appwrite/Messaging/Adapter/Realtime.php b/src/Appwrite/Messaging/Adapter/Realtime.php index dceafacf6e..cd3dcc57c0 100644 --- a/src/Appwrite/Messaging/Adapter/Realtime.php +++ b/src/Appwrite/Messaging/Adapter/Realtime.php @@ -3,6 +3,7 @@ namespace Appwrite\Messaging\Adapter; use Appwrite\Messaging\Adapter; +use Utopia\CLI\Console; use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Helpers\ID; @@ -132,6 +133,7 @@ class Realtime extends Adapter public static function send(string $projectId, array $payload, array $events, array $channels, array $roles, array $options = []): void { if (empty($channels) || empty($roles) || empty($projectId)) { + Console::error('Missing required parameters for Realtime event'); return; } diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 5379fe11b7..09b77a74ab 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1514,12 +1514,6 @@ trait DatabasesBase $this->assertEquals(400, $document4['headers']['status-code']); - // Delete document 4 with incomplete path - $this->assertEquals(404, $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $data['moviesId'] . '/documents/', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()))['headers']['status-code']); - return $data; } @@ -4798,6 +4792,12 @@ trait DatabasesBase ]); $this->assertEquals(408, $response['headers']['status-code']); + + $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); } public function testBulkCreate(): void @@ -4834,7 +4834,6 @@ trait DatabasesBase $this->assertEquals(201, $collection['headers']['status-code']); - $data = [ '$id' => $collection['body']['$id'], 'databaseId' => $collection['body']['databaseId'] @@ -5072,4 +5071,880 @@ trait DatabasesBase $this->assertEquals(200, $response['headers']['status-code']); $this->assertEquals(4, $response['body']['total']); } + + public function testBulkDeletes(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Deletes', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + // wait for database worker to create attributes + sleep(2); + + // Create documents + $createBulkDocuments = function ($amount = 10) use ($data) { + $documents = []; + + for ($x = 0; $x <= $amount; $x++) { + $documents[] = [ + '$id' => ID::unique(), + 'number' => $x, + ]; + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => $documents, + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + }; + + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + // TEST: Delete all documents + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(11, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(0, $documents['body']['total']); + + // TEST: Delete documents with query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::lessThan('number', 5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(6, $documents['body']['total']); + + foreach ($documents['body']['documents'] as $document) { + $this->assertGreaterThanOrEqual(5, $document['number']); + } + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + // SUCCESS: Delete documents with query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::lessThan('number', 5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(6, $documents['body']['total']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + // SUCCESS: Delete Documents with limit query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::limit(2)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(2, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(9, $documents['body']['total']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(9, $response['body']['total']); + + // SUCCESS: Delete Documents with offset query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::offset(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(5, $documents['body']['total']); + + $lastDoc = end($documents['body']['documents']); + + $this->assertNotEmpty($lastDoc); + $this->assertEquals(4, $lastDoc['number']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + // SUCCESS: Delete over 1k documents + $createBulkDocuments(1000); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(1001, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(1001, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(0, $documents['body']['total']); + + // Delete Database + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + } + + public function testBulkDeletesRelationshipRestrict() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_MANY, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_RESTRICT, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + [ + 'name' => 'Document 2', + ], + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(403, $response['headers']['status-code']); + $this->assertEquals('document_delete_restricted', $response['body']['type']); + } + + public function testBulkDeletesRelationshipNull() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_MANY, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_SET_NULL, + 'twoWay' => true, + 'twoWayKey' => 'collection1', + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + [ + 'name' => 'Document 2', + ], + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + + $document2 = $document1['body']['collection2'][0]['$id']; + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + + $document2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents/' . $document2, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $document2['headers']['status-code']); + $this->assertEmpty($document2['body']['collection1']); + } + + public function testBulkDeletesRelationshipCascade() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_ONE, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_CASCADE + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + for ($i = 0; $i < 5; $i++) { + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + 'name' => 'Document 2', + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + } + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + + $collection1docs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $collection1docs['headers']['status-code']); + $this->assertEquals(0, $collection1docs['body']['total']); + + $collection2docs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $collection2docs['headers']['status-code']); + $this->assertEquals(0, $collection2docs['body']['total']); + } + + public function testBulkUpdates(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Updates' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Updates', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + // wait for database worker to create attributes + sleep(2); + + // Create documents + $createBulkDocuments = function ($amount = 10) use ($data) { + $documents = []; + + for ($x = 0; $x <= $amount; $x++) { + $documents[] = [ + '$id' => ID::unique(), + 'number' => $x, + ]; + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => $documents, + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + }; + + $createBulkDocuments(); + + // TEST: Update all documents + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 100 + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + Query::equal('number', [100])->toString(), + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + foreach ($documents['body']['documents'] as $document) { + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], $document['$permissions']); + $this->assertEquals($collection['body']['$id'], $document['$collectionId']); + $this->assertEquals($data['databaseId'], $document['$databaseId']); + } + + // TEST: Check permissions persist + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 200 + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + Query::equal('number', [200])->toString(), + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + foreach ($documents['body']['documents'] as $document) { + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], $document['$permissions']); + } + + // TEST: Update documents with limit + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 300 + ], + 'queries' => [ + Query::limit(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(5, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [200])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(5, $documents['body']['total']); + + // TEST: Update documents with offset + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 300 + ], + 'queries' => [ + Query::offset(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(5, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [300])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + // TEST: Update documents with equals filter + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 400 + ], + 'queries' => [ + Query::equal('number', [300])->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [400])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + } } diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 399a63eb2b..279657201b 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -10,6 +10,7 @@ use Utopia\Database\Database; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Query; class DatabasesCustomClientTest extends Scope { @@ -1103,4 +1104,410 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(201, $response['headers']['status-code']); $this->assertCount(3, $response['body']['documents']); } + + // Bulk Updates + public function testBulkUpdatesPermissions(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Update Perms' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Updates Perms', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])) + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + sleep(2); + + // TEST: Update all documents with invalid collection level permissions + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 100 + ] + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + + $collection = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Bulk Updates Perms', + 'documentSecurity' => true + ]); + + $this->assertEquals(200, $collection['headers']['status-code']); + + // TEST: Make sure we can update only documents we have permissions for + for ($i = 0; $i < 6; $i++) { + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => $i, + ], + 'permissions' => [ + Permission::update(Role::user($this->getUser()['$id'])) + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => 6, + ], + 'permissions' => [ + Permission::update(Role::user('user2')), + Permission::read(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 100 + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(6, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'queries' => [Query::notEqual('number', 100)->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(1, $documents['body']['total']); + } + + public function testBulkUpdatesRelationship() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Updates' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection1['headers']['status-code']); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection1['headers']['status-code']); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_MANY, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_RESTRICT, + 'twoWay' => true, + 'twoWayKey' => 'collection1', + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + [ + 'name' => 'Document 2', + ], + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + $document1 = $document1['body']['$id']; + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'data' => [ + 'name' => 'Document 1 Updated', + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(1, $response['body']['documents']); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + + $document2 = $response['body']['documents'][0]; + + $this->assertEquals('Document 2', $document2['name']); + $this->assertEquals('Document 1 Updated', $document2['collection1']['name']); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'data' => [ + 'name' => 'Document 2 Updated', + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents/' . $document1, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals('Document 1 Updated', $response['body']['name']); + + $document2 = $response['body']['collection2'][0]; + $this->assertEquals('Document 2 Updated', $document2['name']); + } + + public function testBulkDeletesPermissions(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes Perms' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Deletes Perms', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])) + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + sleep(2); + + // TEST: Delete all documents with invalid collection level permissions + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(401, $response['headers']['status-code']); + + $collection = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Bulk Deletes Perms', + 'documentSecurity' => true + ]); + + $this->assertEquals(200, $collection['headers']['status-code']); + + // TEST: Make sure we can delete only documents we have permissions for + for ($i = 0; $i < 6; $i++) { + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => $i, + ], + 'permissions' => [ + Permission::delete(Role::user($this->getUser()['$id'])) + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => 6, + ], + 'permissions' => [ + Permission::delete(Role::user('user2')) + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(1, $documents['body']['total']); + } } diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index 616f309fd2..32ff3f7618 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -650,6 +650,7 @@ class RealtimeCustomClientTest extends Scope $user = $this->getUser(); $session = $user['session'] ?? ''; $projectId = $this->getProject()['$id']; + $documentIds = []; $client = $this->getWebsocket(['documents', 'collections'], [ 'origin' => 'http://localhost', @@ -739,6 +740,7 @@ class RealtimeCustomClientTest extends Scope $response = json_decode($client->receive(), true); $documentId = $document['body']['$id']; + $documentIds[] = $documentId; $this->assertArrayHasKey('type', $response); $this->assertArrayHasKey('data', $response);