diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index aaf713b5c5..0a38f16346 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4743,6 +4743,99 @@ } } } + }, + "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}": { @@ -5051,7 +5144,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -5139,7 +5232,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5256,7 +5349,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5332,7 +5425,7 @@ }, "x-appwrite": { "method": "query", - "weight": 332, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5386,7 +5479,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 331, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5440,7 +5533,7 @@ }, "x-appwrite": { "method": "get", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5494,7 +5587,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5548,7 +5641,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5602,7 +5695,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5656,7 +5749,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5710,7 +5803,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5764,7 +5857,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5818,7 +5911,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5872,7 +5965,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -5957,7 +6050,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -6034,7 +6127,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -6122,7 +6215,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -6222,7 +6315,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -6296,7 +6389,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6387,7 +6480,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6456,7 +6549,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6525,7 +6618,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6743,7 +6836,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6819,7 +6912,7 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6897,7 +6990,7 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6984,7 +7077,7 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -7048,7 +7141,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7124,7 +7217,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7190,7 +7283,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7278,7 +7371,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7391,7 +7484,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7465,7 +7558,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7554,7 +7647,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7630,7 +7723,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7730,7 +7823,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7793,7 +7886,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "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 87a9b7ac7f..00ac994446 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": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4534,7 +4534,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4740,7 +4740,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8312,6 +8312,99 @@ } } } + }, + "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}": { @@ -9161,7 +9254,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -9330,7 +9423,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9414,7 +9507,7 @@ }, "x-appwrite": { "method": "list", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9489,7 +9582,7 @@ }, "x-appwrite": { "method": "create", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9594,7 +9687,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9737,7 +9831,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9788,7 +9882,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9840,7 +9934,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -9942,7 +10036,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -10004,7 +10098,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -10078,7 +10172,7 @@ }, "x-appwrite": { "method": "get", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10139,7 +10233,7 @@ }, "x-appwrite": { "method": "update", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10251,7 +10345,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -10364,7 +10459,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10427,7 +10522,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10512,7 +10607,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10610,7 +10705,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10681,7 +10776,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10745,7 +10840,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10811,7 +10906,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10898,7 +10993,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10964,7 +11059,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 297, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -11039,7 +11134,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11127,7 +11222,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11244,7 +11339,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11311,7 +11406,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11384,7 +11479,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -11468,7 +11563,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11529,7 +11624,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11617,7 +11712,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11688,7 +11783,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11776,7 +11871,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11849,7 +11944,7 @@ }, "x-appwrite": { "method": "query", - "weight": 332, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -11903,7 +11998,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 331, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -11957,7 +12052,7 @@ }, "x-appwrite": { "method": "get", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12008,7 +12103,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -12059,7 +12154,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12110,7 +12205,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12172,7 +12267,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12223,7 +12318,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12274,7 +12369,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12325,7 +12420,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12389,7 +12484,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12453,7 +12548,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12528,7 +12623,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12592,7 +12687,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12682,7 +12777,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12746,7 +12841,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -12810,7 +12905,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12874,7 +12969,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12938,7 +13033,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13002,7 +13097,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13066,7 +13161,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13130,7 +13225,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -13194,7 +13289,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13245,7 +13340,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13296,7 +13391,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -13347,7 +13442,7 @@ }, "x-appwrite": { "method": "get", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13401,7 +13496,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13455,7 +13550,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13509,7 +13604,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13563,7 +13658,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13617,7 +13712,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13671,7 +13766,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13725,7 +13820,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13779,7 +13874,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13857,7 +13952,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14003,7 +14098,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14151,7 +14246,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14308,7 +14403,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -14467,7 +14562,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -14578,7 +14673,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14692,7 +14787,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -14747,7 +14842,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -14811,7 +14906,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14888,7 +14983,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14965,7 +15060,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15043,7 +15138,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15150,7 +15245,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -15260,7 +15355,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15347,7 +15442,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -15437,7 +15532,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15554,7 +15649,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15674,7 +15769,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -15771,7 +15866,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15871,7 +15966,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15978,7 +16073,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16088,7 +16183,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16233,7 +16328,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16380,7 +16475,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16477,7 +16572,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16577,7 +16672,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16674,7 +16769,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16774,7 +16869,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -16871,7 +16966,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16971,7 +17066,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -17068,7 +17163,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17168,7 +17263,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -17223,7 +17318,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17287,7 +17382,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -17364,7 +17459,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -17441,7 +17536,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17517,7 +17612,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17602,7 +17697,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17664,7 +17759,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17743,7 +17838,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17807,7 +17902,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17884,7 +17979,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -17970,7 +18065,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -18062,7 +18157,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -18127,7 +18222,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -18204,7 +18299,7 @@ }, "x-appwrite": { "method": "list", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18280,7 +18375,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18370,7 +18465,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18465,7 +18560,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18536,7 +18631,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -18586,7 +18681,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -18664,7 +18759,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -18714,7 +18809,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -18788,7 +18883,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -18862,7 +18957,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -18975,7 +19070,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19110,7 +19205,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -19217,7 +19312,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19343,7 +19438,7 @@ }, "x-appwrite": { "method": "get", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -19403,7 +19498,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -19456,7 +19551,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -19518,7 +19613,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19608,7 +19703,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19656,7 +19751,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19731,7 +19826,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19791,7 +19886,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19868,7 +19963,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19930,7 +20025,7 @@ }, "x-appwrite": { "method": "list", - "weight": 152, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20004,7 +20099,7 @@ }, "x-appwrite": { "method": "create", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20141,7 +20236,7 @@ }, "x-appwrite": { "method": "get", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20201,7 +20296,7 @@ }, "x-appwrite": { "method": "update", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20318,7 +20413,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20380,7 +20475,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20474,7 +20569,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -20555,7 +20650,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20636,7 +20731,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -20717,7 +20812,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20798,7 +20893,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20891,7 +20986,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -20975,7 +21070,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21056,7 +21151,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21137,7 +21232,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21218,7 +21313,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -21299,7 +21394,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -21401,7 +21496,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21490,7 +21585,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -21550,7 +21645,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21645,7 +21740,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21715,7 +21810,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21811,7 +21906,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21883,7 +21978,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 160, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -22022,7 +22117,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22082,7 +22177,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22203,7 +22298,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22273,7 +22368,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22370,7 +22465,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22442,7 +22537,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -22544,7 +22639,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -22625,7 +22720,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22745,7 +22840,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22878,7 +22973,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -22959,7 +23054,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23185,7 +23280,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23451,7 +23546,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23679,7 +23774,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23902,7 +23997,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24144,7 +24239,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24369,7 +24464,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24429,7 +24524,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -24546,7 +24641,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -24616,7 +24711,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24734,7 +24829,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -24806,7 +24901,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -24878,7 +24973,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -24952,7 +25047,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -25038,7 +25133,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -25091,7 +25186,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -25153,7 +25248,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -25215,7 +25310,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25290,7 +25385,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25419,7 +25514,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25480,7 +25575,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -25606,7 +25701,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -25669,7 +25764,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25757,7 +25852,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -25857,7 +25952,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -25931,7 +26026,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -26022,7 +26117,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -26091,7 +26186,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -26160,7 +26255,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26378,7 +26473,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -26454,7 +26549,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -26528,7 +26623,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -26612,7 +26707,7 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -26690,7 +26785,7 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -26777,7 +26872,7 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -26841,7 +26936,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -26917,7 +27012,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -26983,7 +27078,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -27058,7 +27153,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27146,7 +27241,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27259,7 +27354,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27333,7 +27428,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27422,7 +27517,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -27498,7 +27593,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -27597,7 +27692,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -27659,7 +27754,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -27742,7 +27837,7 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -27817,7 +27912,7 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -27907,7 +28002,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -27994,7 +28089,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -28081,7 +28176,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -28151,7 +28246,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -28214,7 +28309,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -28301,7 +28396,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28388,7 +28483,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -28505,7 +28600,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -28610,7 +28705,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -28717,7 +28812,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -28791,7 +28886,7 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -28845,7 +28940,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -28908,7 +29003,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -28990,7 +29085,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -29074,7 +29169,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -29159,7 +29254,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -29235,7 +29330,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -29298,7 +29393,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29380,7 +29475,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -29458,7 +29553,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -29521,7 +29616,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -29582,7 +29677,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -29643,7 +29738,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -29706,7 +29801,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -29788,7 +29883,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -29870,7 +29965,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -29952,7 +30047,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -30013,7 +30108,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -30095,7 +30190,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -30156,7 +30251,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30210,7 +30305,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -30266,7 +30361,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -30339,7 +30434,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30421,7 +30516,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -30496,7 +30591,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -30608,7 +30703,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -30680,7 +30775,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -30771,7 +30866,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -30845,7 +30940,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30929,7 +31024,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -31011,7 +31106,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -31093,7 +31188,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31164,7 +31259,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31251,7 +31346,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -31323,7 +31418,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -31395,7 +31490,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -31478,7 +31573,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -31559,7 +31654,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -31650,7 +31745,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -31726,7 +31821,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -31779,7 +31874,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 287, + "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 08d58bc9b9..cf76b72014 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -7843,6 +7843,101 @@ } } } + }, + "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}": { @@ -8522,7 +8617,7 @@ }, "x-appwrite": { "method": "list", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8598,7 +8693,7 @@ }, "x-appwrite": { "method": "create", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8704,7 +8799,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -8847,7 +8943,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8899,7 +8995,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8952,7 +9048,7 @@ }, "x-appwrite": { "method": "get", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9014,7 +9110,7 @@ }, "x-appwrite": { "method": "update", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9127,7 +9223,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9240,7 +9337,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9304,7 +9401,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9390,7 +9487,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9489,7 +9586,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9561,7 +9658,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9626,7 +9723,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9693,7 +9790,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9781,7 +9878,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9848,7 +9945,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 297, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -9924,7 +10021,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10014,7 +10111,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10133,7 +10230,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10202,7 +10299,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10276,7 +10373,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10338,7 +10435,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10427,7 +10524,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10499,7 +10596,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10588,7 +10685,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10662,7 +10759,7 @@ }, "x-appwrite": { "method": "query", - "weight": 332, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10718,7 +10815,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 331, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10774,7 +10871,7 @@ }, "x-appwrite": { "method": "get", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10826,7 +10923,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -10878,7 +10975,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -10930,7 +11027,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10993,7 +11090,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11045,7 +11142,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11097,7 +11194,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11149,7 +11246,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11214,7 +11311,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11279,7 +11376,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11355,7 +11452,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11420,7 +11517,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -11511,7 +11608,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11576,7 +11673,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11641,7 +11738,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11706,7 +11803,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11771,7 +11868,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11836,7 +11933,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11901,7 +11998,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11966,7 +12063,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12031,7 +12128,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12083,7 +12180,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12135,7 +12232,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12187,7 +12284,7 @@ }, "x-appwrite": { "method": "get", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12243,7 +12340,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12299,7 +12396,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12355,7 +12452,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12411,7 +12508,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12467,7 +12564,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12523,7 +12620,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12579,7 +12676,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12635,7 +12732,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -12714,7 +12811,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -12861,7 +12958,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -13010,7 +13107,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13168,7 +13265,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -13328,7 +13425,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13440,7 +13537,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13555,7 +13652,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13611,7 +13708,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -13676,7 +13773,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13754,7 +13851,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -13832,7 +13929,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -13911,7 +14008,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14019,7 +14116,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14130,7 +14227,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14218,7 +14315,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -14309,7 +14406,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14427,7 +14524,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -14548,7 +14645,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14646,7 +14743,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -14747,7 +14844,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -14855,7 +14952,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -14966,7 +15063,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15112,7 +15209,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15260,7 +15357,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -15358,7 +15455,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15459,7 +15556,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15557,7 +15654,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15658,7 +15755,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15756,7 +15853,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15857,7 +15954,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15955,7 +16052,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16056,7 +16153,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16112,7 +16209,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16177,7 +16274,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -16255,7 +16352,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -16333,7 +16430,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16410,7 +16507,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16496,7 +16593,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16559,7 +16656,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16639,7 +16736,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -16704,7 +16801,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16782,7 +16879,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -16869,7 +16966,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -16963,7 +17060,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -17029,7 +17126,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -17108,7 +17205,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17184,7 +17281,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17314,7 +17411,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17376,7 +17473,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -17503,7 +17600,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17567,7 +17664,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -17657,7 +17754,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -17759,7 +17856,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -17835,7 +17932,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -17928,7 +18025,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -17999,7 +18096,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -18070,7 +18167,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18290,7 +18387,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -18368,7 +18465,7 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -18448,7 +18545,7 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18537,7 +18634,7 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -18603,7 +18700,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -18681,7 +18778,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18749,7 +18846,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -18839,7 +18936,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18954,7 +19051,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -19030,7 +19127,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19121,7 +19218,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19199,7 +19296,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -19300,7 +19397,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19364,7 +19461,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19449,7 +19546,7 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -19525,7 +19622,7 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -19616,7 +19713,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -19704,7 +19801,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19792,7 +19889,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -19863,7 +19960,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -19927,7 +20024,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20015,7 +20112,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -20103,7 +20200,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -20221,7 +20318,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -20327,7 +20424,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20435,7 +20532,7 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -20490,7 +20587,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20554,7 +20651,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -20637,7 +20734,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20722,7 +20819,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -20808,7 +20905,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20885,7 +20982,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -20949,7 +21046,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -21032,7 +21129,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -21111,7 +21208,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21175,7 +21272,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21237,7 +21334,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21299,7 +21396,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21363,7 +21460,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21446,7 +21543,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21529,7 +21626,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -21612,7 +21709,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -21674,7 +21771,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -21757,7 +21854,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21819,7 +21916,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21874,7 +21971,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21931,7 +22028,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -22005,7 +22102,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -22088,7 +22185,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -22164,7 +22261,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22277,7 +22374,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -22350,7 +22447,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22442,7 +22539,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -22517,7 +22614,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -22602,7 +22699,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22685,7 +22782,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "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 4ebd7afd3e..7a59bb87ea 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4907,6 +4907,96 @@ } } ] + }, + "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}": { @@ -5206,7 +5296,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -5291,7 +5381,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5412,7 +5502,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5486,7 +5576,7 @@ }, "x-appwrite": { "method": "query", - "weight": 332, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5562,7 +5652,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 331, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5638,7 +5728,7 @@ }, "x-appwrite": { "method": "get", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5694,7 +5784,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5750,7 +5840,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5806,7 +5896,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5862,7 +5952,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5918,7 +6008,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5974,7 +6064,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -6030,7 +6120,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -6086,7 +6176,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -6175,7 +6265,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -6250,7 +6340,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -6335,7 +6425,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -6429,7 +6519,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -6501,7 +6591,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6592,7 +6682,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6666,7 +6756,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6740,7 +6830,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6941,7 +7031,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -7015,7 +7105,7 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -7092,7 +7182,7 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -7186,7 +7276,7 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -7250,7 +7340,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -7327,7 +7417,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7393,7 +7483,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7478,7 +7568,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7595,7 +7685,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7667,7 +7757,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7755,7 +7845,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7829,7 +7919,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7927,7 +8017,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7990,7 +8080,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "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 bfcf354c83..52473c5538 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": 334, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4731,7 +4731,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 333, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4943,7 +4943,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 115, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8463,6 +8463,96 @@ } } ] + }, + "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}": { @@ -9286,7 +9376,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 117, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -9450,7 +9540,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 116, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9532,7 +9622,7 @@ }, "x-appwrite": { "method": "list", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9606,7 +9696,7 @@ }, "x-appwrite": { "method": "create", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9715,7 +9805,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9878,7 +9969,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9931,7 +10022,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9985,7 +10076,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 315, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -10083,7 +10174,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 316, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -10145,7 +10236,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 295, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -10219,7 +10310,7 @@ }, "x-appwrite": { "method": "get", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -10280,7 +10371,7 @@ }, "x-appwrite": { "method": "update", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10391,7 +10482,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -10522,7 +10614,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10585,7 +10677,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10667,7 +10759,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10761,7 +10853,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10830,7 +10922,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10894,7 +10986,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10960,7 +11052,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -11044,7 +11136,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -11115,7 +11207,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 297, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -11188,7 +11280,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -11273,7 +11365,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -11394,7 +11486,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11461,7 +11553,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11532,7 +11624,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 294, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -11614,7 +11706,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11675,7 +11767,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11763,7 +11855,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11832,7 +11924,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11920,7 +12012,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11991,7 +12083,7 @@ }, "x-appwrite": { "method": "query", - "weight": 332, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -12067,7 +12159,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 331, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -12143,7 +12235,7 @@ }, "x-appwrite": { "method": "get", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -12196,7 +12288,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -12249,7 +12341,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -12302,7 +12394,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12364,7 +12456,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -12417,7 +12509,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12470,7 +12562,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -12523,7 +12615,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12587,7 +12679,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12651,7 +12743,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12724,7 +12816,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12788,7 +12880,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12876,7 +12968,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12940,7 +13032,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -13004,7 +13096,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -13068,7 +13160,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -13132,7 +13224,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -13196,7 +13288,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -13260,7 +13352,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -13324,7 +13416,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -13388,7 +13480,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -13441,7 +13533,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -13494,7 +13586,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -13547,7 +13639,7 @@ }, "x-appwrite": { "method": "get", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13603,7 +13695,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13659,7 +13751,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13715,7 +13807,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13771,7 +13863,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13827,7 +13919,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13883,7 +13975,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13939,7 +14031,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13995,7 +14087,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -14072,7 +14164,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14232,7 +14324,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -14389,7 +14481,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14564,7 +14656,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -14736,7 +14828,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -14856,7 +14948,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -14974,7 +15066,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -15033,7 +15125,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -15097,7 +15189,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -15173,7 +15265,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -15249,7 +15341,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15326,7 +15418,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15443,7 +15535,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -15558,7 +15650,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15651,7 +15743,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -15742,7 +15834,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15871,7 +15963,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15998,7 +16090,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -16103,7 +16195,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -16206,7 +16298,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -16323,7 +16415,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16438,7 +16530,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -16599,7 +16691,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -16757,7 +16849,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -16862,7 +16954,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16965,7 +17057,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -17070,7 +17162,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17173,7 +17265,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -17278,7 +17370,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -17381,7 +17473,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -17486,7 +17578,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17589,7 +17681,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -17648,7 +17740,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17712,7 +17804,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -17788,7 +17880,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -17864,7 +17956,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17939,7 +18031,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -18031,7 +18123,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -18093,7 +18185,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -18176,7 +18268,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -18240,7 +18332,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -18316,7 +18408,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -18399,7 +18491,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -18491,7 +18583,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -18558,7 +18650,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -18633,7 +18725,7 @@ }, "x-appwrite": { "method": "list", - "weight": 340, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18708,7 +18800,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 335, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18804,7 +18896,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 342, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18894,7 +18986,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 337, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18976,7 +19068,7 @@ }, "x-appwrite": { "method": "deleteFirebaseAuth", - "weight": 348, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -19028,7 +19120,7 @@ }, "x-appwrite": { "method": "createFirebaseOAuthMigration", - "weight": 336, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -19110,7 +19202,7 @@ }, "x-appwrite": { "method": "listFirebaseProjects", - "weight": 347, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -19162,7 +19254,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 343, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -19235,7 +19327,7 @@ }, "x-appwrite": { "method": "getFirebaseReportOAuth", - "weight": 344, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -19308,7 +19400,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 339, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -19431,7 +19523,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 350, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -19553,7 +19645,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 338, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -19669,7 +19761,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 349, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -19784,7 +19876,7 @@ }, "x-appwrite": { "method": "get", - "weight": 341, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -19844,7 +19936,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 351, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -19899,7 +19991,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 352, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -19961,7 +20053,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 197, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -20047,7 +20139,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 199, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -20097,7 +20189,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 198, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -20176,7 +20268,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 200, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -20236,7 +20328,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 201, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -20315,7 +20407,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 202, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -20377,7 +20469,7 @@ }, "x-appwrite": { "method": "list", - "weight": 152, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -20450,7 +20542,7 @@ }, "x-appwrite": { "method": "create", - "weight": 151, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -20602,7 +20694,7 @@ }, "x-appwrite": { "method": "get", - "weight": 153, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -20662,7 +20754,7 @@ }, "x-appwrite": { "method": "update", - "weight": 154, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -20789,7 +20881,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 171, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -20851,7 +20943,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 158, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -20945,7 +21037,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 159, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -21025,7 +21117,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 164, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -21105,7 +21197,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 163, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -21185,7 +21277,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 169, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -21265,7 +21357,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 162, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -21359,7 +21451,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 170, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -21442,7 +21534,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 167, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -21522,7 +21614,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 166, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -21602,7 +21694,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 168, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -21682,7 +21774,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 161, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -21762,7 +21854,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 165, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -21861,7 +21953,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 183, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -21950,7 +22042,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 179, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -22010,7 +22102,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 178, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -22106,7 +22198,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 180, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -22174,7 +22266,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 181, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -22271,7 +22363,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 182, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -22341,7 +22433,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 160, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -22482,7 +22574,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 185, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -22542,7 +22634,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 184, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -22666,7 +22758,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 186, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -22734,7 +22826,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 187, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -22833,7 +22925,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 188, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -22903,7 +22995,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 156, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -23005,7 +23097,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 157, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -23085,7 +23177,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 189, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -23214,7 +23306,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 190, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -23354,7 +23446,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 155, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -23434,7 +23526,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 192, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -23656,7 +23748,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 194, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -23921,7 +24013,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 196, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -24145,7 +24237,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 191, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -24364,7 +24456,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 193, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -24601,7 +24693,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 195, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -24822,7 +24914,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 173, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -24882,7 +24974,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 172, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -25004,7 +25096,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 174, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -25072,7 +25164,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 175, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -25195,7 +25287,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 177, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -25265,7 +25357,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 176, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -25335,7 +25427,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 318, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -25408,7 +25500,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 317, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -25499,7 +25591,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 319, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -25554,7 +25646,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 320, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -25616,7 +25708,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 321, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -25678,7 +25770,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -25752,7 +25844,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -25893,7 +25985,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -25954,7 +26046,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -26089,7 +26181,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -26152,7 +26244,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -26237,7 +26329,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -26331,7 +26423,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -26403,7 +26495,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -26494,7 +26586,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -26568,7 +26660,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -26642,7 +26734,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -26843,7 +26935,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -26917,7 +27009,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 217, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -26991,7 +27083,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 218, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -27073,7 +27165,7 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -27150,7 +27242,7 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -27244,7 +27336,7 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -27308,7 +27400,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -27385,7 +27477,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -27451,7 +27543,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 232, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -27525,7 +27617,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -27610,7 +27702,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -27727,7 +27819,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -27799,7 +27891,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -27887,7 +27979,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -27961,7 +28053,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -28058,7 +28150,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -28120,7 +28212,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -28202,7 +28294,7 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -28276,7 +28368,7 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -28373,7 +28465,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -28466,7 +28558,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -28559,7 +28651,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -28630,7 +28722,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -28693,7 +28785,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -28786,7 +28878,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -28879,7 +28971,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -29007,7 +29099,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -29121,7 +29213,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -29235,7 +29327,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 275, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -29309,7 +29401,7 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -29365,7 +29457,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -29428,7 +29520,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -29509,7 +29601,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -29593,7 +29685,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -29677,7 +29769,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -29752,7 +29844,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -29815,7 +29907,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -29896,7 +29988,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -29972,7 +30064,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -30035,7 +30127,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -30096,7 +30188,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -30157,7 +30249,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -30220,7 +30312,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -30301,7 +30393,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -30382,7 +30474,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -30463,7 +30555,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -30524,7 +30616,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -30605,7 +30697,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -30666,7 +30758,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -30722,7 +30814,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -30780,7 +30872,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -30851,7 +30943,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -30932,7 +31024,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -31006,7 +31098,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -31121,7 +31213,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -31191,7 +31283,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -31285,7 +31377,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -31357,7 +31449,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -31441,7 +31533,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -31522,7 +31614,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -31603,7 +31695,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 280, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -31672,7 +31764,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 281, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -31759,7 +31851,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 282, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -31829,7 +31921,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 283, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -31899,7 +31991,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 278, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -31978,7 +32070,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 279, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -32058,7 +32150,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 288, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -32146,7 +32238,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 285, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -32221,7 +32313,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 286, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -32276,7 +32368,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 287, + "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 9e931ad04f..b9c2e86451 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -7981,6 +7981,98 @@ } } ] + }, + "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}": { @@ -8642,7 +8734,7 @@ }, "x-appwrite": { "method": "list", - "weight": 290, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8717,7 +8809,7 @@ }, "x-appwrite": { "method": "create", - "weight": 289, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8827,7 +8919,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -8990,7 +9083,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 291, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9044,7 +9137,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 292, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9099,7 +9192,7 @@ }, "x-appwrite": { "method": "get", - "weight": 293, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9161,7 +9254,7 @@ }, "x-appwrite": { "method": "update", - "weight": 296, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9273,7 +9366,8 @@ "bun-1.0", "bun-1.1", "go-1.23", - "static-1" + "static-1", + "flutter-3.24" ], "x-enum-name": null, "x-enum-keys": [] @@ -9404,7 +9498,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 299, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9468,7 +9562,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 301, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9551,7 +9645,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 300, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9646,7 +9740,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 302, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9716,7 +9810,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 298, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9781,7 +9875,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 303, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9848,7 +9942,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 304, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9933,7 +10027,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 305, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10005,7 +10099,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 297, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -10079,7 +10173,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 307, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10166,7 +10260,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 306, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10289,7 +10383,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 308, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10358,7 +10452,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 309, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10430,7 +10524,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 311, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10492,7 +10586,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 310, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10581,7 +10675,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 312, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10651,7 +10745,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 313, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10740,7 +10834,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 314, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10812,7 +10906,7 @@ }, "x-appwrite": { "method": "query", - "weight": 332, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10890,7 +10984,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 331, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10968,7 +11062,7 @@ }, "x-appwrite": { "method": "get", - "weight": 126, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -11022,7 +11116,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 148, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -11076,7 +11170,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 129, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11130,7 +11224,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 135, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11193,7 +11287,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 128, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11247,7 +11341,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 131, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11301,7 +11395,7 @@ }, "x-appwrite": { "method": "getQueue", - "weight": 130, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11355,7 +11449,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 137, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11420,7 +11514,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 136, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11485,7 +11579,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 138, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11559,7 +11653,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 139, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11624,7 +11718,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 149, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -11713,7 +11807,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 143, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11778,7 +11872,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 134, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11843,7 +11937,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 140, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11908,7 +12002,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 141, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11973,7 +12067,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 142, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12038,7 +12132,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 144, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12103,7 +12197,7 @@ }, "x-appwrite": { "method": "getQueueUsageDump", - "weight": 145, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12168,7 +12262,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 133, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12233,7 +12327,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 147, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12287,7 +12381,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 146, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12341,7 +12435,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 132, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12395,7 +12489,7 @@ }, "x-appwrite": { "method": "get", - "weight": 118, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12453,7 +12547,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 119, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12511,7 +12605,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 123, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12569,7 +12663,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 120, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12627,7 +12721,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 121, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12685,7 +12779,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 122, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12743,7 +12837,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 124, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12801,7 +12895,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 125, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12859,7 +12953,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 391, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -12937,7 +13031,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 388, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13098,7 +13192,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 395, + "weight": 396, "cookies": false, "type": "", "deprecated": false, @@ -13256,7 +13350,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 390, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13432,7 +13526,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 397, + "weight": 398, "cookies": false, "type": "", "deprecated": false, @@ -13605,7 +13699,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 389, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13726,7 +13820,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 396, + "weight": 397, "cookies": false, "type": "", "deprecated": false, @@ -13845,7 +13939,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 394, + "weight": 395, "cookies": false, "type": "", "deprecated": false, @@ -13905,7 +13999,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 398, + "weight": 399, "cookies": false, "type": "", "deprecated": false, @@ -13970,7 +14064,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 392, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14047,7 +14141,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 393, + "weight": 394, "cookies": false, "type": "", "deprecated": false, @@ -14124,7 +14218,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 363, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14202,7 +14296,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 362, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14320,7 +14414,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 375, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -14436,7 +14530,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 361, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14530,7 +14624,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 374, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -14622,7 +14716,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 353, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -14752,7 +14846,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 366, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -14880,7 +14974,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 356, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14986,7 +15080,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 369, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -15090,7 +15184,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 354, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15208,7 +15302,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 367, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15324,7 +15418,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 355, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15486,7 +15580,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 368, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15645,7 +15739,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 357, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -15751,7 +15845,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 370, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15855,7 +15949,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 358, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15961,7 +16055,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 371, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16065,7 +16159,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 359, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -16171,7 +16265,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 372, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16275,7 +16369,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 360, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -16381,7 +16475,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 373, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16485,7 +16579,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 365, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16545,7 +16639,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 376, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16610,7 +16704,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 364, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -16687,7 +16781,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 385, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -16764,7 +16858,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 378, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16840,7 +16934,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 377, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16933,7 +17027,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 380, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16996,7 +17090,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 381, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17080,7 +17174,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 382, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -17145,7 +17239,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 379, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17222,7 +17316,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 384, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -17306,7 +17400,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 383, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -17400,7 +17494,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 386, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -17468,7 +17562,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 387, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -17545,7 +17639,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 204, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17620,7 +17714,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 203, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17762,7 +17856,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 205, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17824,7 +17918,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 206, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -17960,7 +18054,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 207, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -18024,7 +18118,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 209, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -18111,7 +18205,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 208, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -18207,7 +18301,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 210, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -18281,7 +18375,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 215, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -18374,7 +18468,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 216, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -18450,7 +18544,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 212, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -18526,7 +18620,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 211, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18729,7 +18823,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 213, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -18805,7 +18899,7 @@ }, "x-appwrite": { "method": "list", - "weight": 220, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -18884,7 +18978,7 @@ }, "x-appwrite": { "method": "create", - "weight": 219, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18980,7 +19074,7 @@ }, "x-appwrite": { "method": "get", - "weight": 221, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -19046,7 +19140,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 223, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -19125,7 +19219,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 225, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -19193,7 +19287,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 227, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -19280,7 +19374,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 226, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -19399,7 +19493,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 228, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -19473,7 +19567,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 229, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -19563,7 +19657,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 231, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -19639,7 +19733,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 230, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -19738,7 +19832,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 222, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19802,7 +19896,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 224, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19886,7 +19980,7 @@ }, "x-appwrite": { "method": "list", - "weight": 242, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -19961,7 +20055,7 @@ }, "x-appwrite": { "method": "create", - "weight": 233, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -20059,7 +20153,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 236, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -20153,7 +20247,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 234, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -20247,7 +20341,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 250, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -20319,7 +20413,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 273, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -20383,7 +20477,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 235, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -20477,7 +20571,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 238, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -20571,7 +20665,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 239, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -20700,7 +20794,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 240, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -20815,7 +20909,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 237, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20930,7 +21024,7 @@ }, "x-appwrite": { "method": "get", - "weight": 243, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -20987,7 +21081,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 271, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -21051,7 +21145,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 256, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -21133,7 +21227,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 274, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -21218,7 +21312,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 252, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -21303,7 +21397,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 248, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -21379,7 +21473,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 247, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -21443,7 +21537,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 261, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -21525,7 +21619,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 266, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -21602,7 +21696,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 262, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -21666,7 +21760,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 263, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -21728,7 +21822,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 265, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21790,7 +21884,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 264, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21854,7 +21948,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 254, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21936,7 +22030,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 255, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -22018,7 +22112,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 257, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -22100,7 +22194,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 244, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -22162,7 +22256,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 259, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -22244,7 +22338,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 246, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -22306,7 +22400,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 267, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -22363,7 +22457,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 270, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -22422,7 +22516,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 269, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -22494,7 +22588,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 251, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -22576,7 +22670,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 249, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -22651,7 +22745,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 241, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -22767,7 +22861,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 245, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -22838,7 +22932,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 260, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22933,7 +23027,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 272, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -23006,7 +23100,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 268, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -23091,7 +23185,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 258, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -23173,7 +23267,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 253, + "weight": 254, "cookies": false, "type": "", "deprecated": false, diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index f3064b1627..875b01f656 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -47,6 +47,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; @@ -3908,6 +3909,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 f5921bf6e8..c5771fb921 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -90,10 +90,17 @@ $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; } + if ($event === Database::EVENT_DOCUMENTS_DELETE) { + $value = -1 * $document->getAttribute('modified', 0); + } elseif ($event === Database::EVENT_DOCUMENTS_CREATE) { + $value = $document->getAttribute('modified', 0); + } + switch (true) { case $document->getCollection() === 'teams': $queueForUsage diff --git a/composer.json b/composer.json index ca18bed28a..0cd20fc577 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.53.23", + "utopia-php/database": "0.53.27", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*", diff --git a/composer.lock b/composer.lock index 08c97122b6..f5a7dd7906 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "28e6c599d5da0991d373aba9f3988309", + "content-hash": "0b299e8aaf279f410c6d81c1ad3a5031", "packages": [ { "name": "adhocore/jwt", @@ -3476,16 +3476,16 @@ }, { "name": "utopia-php/database", - "version": "0.53.23", + "version": "0.53.27", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "b5bd17ef34f37018dca06cb764387e1e40bfe63a" + "reference": "d3a8cae6e743a6a1a5719b860762a03aabce678a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/b5bd17ef34f37018dca06cb764387e1e40bfe63a", - "reference": "b5bd17ef34f37018dca06cb764387e1e40bfe63a", + "url": "https://api.github.com/repos/utopia-php/database/zipball/d3a8cae6e743a6a1a5719b860762a03aabce678a", + "reference": "d3a8cae6e743a6a1a5719b860762a03aabce678a", "shasum": "" }, "require": { @@ -3526,9 +3526,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/0.53.23" + "source": "https://github.com/utopia-php/database/tree/0.53.27" }, - "time": "2024-11-21T05:07:44+00:00" + "time": "2024-12-02T08:53:55+00:00" }, { "name": "utopia-php/domains", 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/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/src/Appwrite/Utopia/Response.php b/src/Appwrite/Utopia/Response.php index 53aa2389ed..6cc2639f51 100644 --- a/src/Appwrite/Utopia/Response.php +++ b/src/Appwrite/Utopia/Response.php @@ -31,7 +31,6 @@ use Appwrite\Utopia\Response\Model\BaseList; use Appwrite\Utopia\Response\Model\Branch; use Appwrite\Utopia\Response\Model\Bucket; use Appwrite\Utopia\Response\Model\Build; -use Appwrite\Utopia\Response\Model\BulkOperation; use Appwrite\Utopia\Response\Model\Collection; use Appwrite\Utopia\Response\Model\ConsoleVariables; use Appwrite\Utopia\Response\Model\Continent; @@ -152,7 +151,6 @@ class Response extends SwooleResponse public const MODEL_INDEX_LIST = 'indexList'; public const MODEL_DOCUMENT = 'document'; public const MODEL_DOCUMENT_LIST = 'documentList'; - public const MODEL_BULK_OPERATION = 'bulkOperation'; // Database Attributes public const MODEL_ATTRIBUTE = 'attribute'; @@ -484,7 +482,6 @@ class Response extends SwooleResponse ->setModel(new Migration()) ->setModel(new MigrationReport()) ->setModel(new MigrationFirebaseProject()) - ->setModel(new BulkOperation()) // Tests (keep last) ->setModel(new Mock()); diff --git a/src/Appwrite/Utopia/Response/Model/BulkOperation.php b/src/Appwrite/Utopia/Response/Model/BulkOperation.php deleted file mode 100644 index 7c6d7f6fe9..0000000000 --- a/src/Appwrite/Utopia/Response/Model/BulkOperation.php +++ /dev/null @@ -1,40 +0,0 @@ -addRule('modified', [ - 'type' => self::TYPE_INTEGER, - 'description' => 'Total number of documents affected by the operation.', - 'default' => 0, - 'example' => 64, - ]); - } - - /** - * Get Name - * - * @return string - */ - public function getName(): string - { - return 'BulkOperation'; - } - - /** - * Get Type - * - * @return string - */ - public function getType(): string - { - return Response::MODEL_BULK_OPERATION; - } -} diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index e6923ca1af..fa98fd1a15 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,659 @@ 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 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) { + for ($x = 0; $x <= $amount; $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()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => $x, + ], + ]); + + $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 diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index e106253cfb..12f5c0216d 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -892,6 +892,7 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); } + // Bulk Updates public function testBulkUpdatesPermissions(): void { // Create database @@ -907,7 +908,6 @@ class DatabasesCustomClientTest extends Scope $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'], @@ -928,6 +928,7 @@ class DatabasesCustomClientTest extends Scope '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'], @@ -1175,4 +1176,125 @@ class DatabasesCustomClientTest extends Scope $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']); + } }