diff --git a/app/config/specs/open-api3-1.6.x-client.json b/app/config/specs/open-api3-1.6.x-client.json index 316fe13116..0b92434498 100644 --- a/app/config/specs/open-api3-1.6.x-client.json +++ b/app/config/specs/open-api3-1.6.x-client.json @@ -4367,7 +4367,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -4398,6 +4398,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -4447,6 +4492,14 @@ "description": "Document data as JSON object.", "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -4455,11 +4508,192 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } } @@ -4680,7 +4914,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -4763,7 +4997,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -4848,7 +5082,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +5196,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5035,7 +5269,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5086,7 +5320,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5137,7 +5371,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5188,7 +5422,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5239,7 +5473,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5290,7 +5524,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5341,7 +5575,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5392,7 +5626,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5443,7 +5677,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5494,7 +5728,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5545,7 +5779,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -5627,7 +5861,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -5701,7 +5935,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -5786,7 +6020,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -5883,7 +6117,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -5954,7 +6188,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6042,7 +6276,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6108,7 +6342,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6174,7 +6408,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6390,7 +6624,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6463,7 +6697,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6538,7 +6772,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6622,7 +6856,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6683,7 +6917,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6756,7 +6990,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -6819,7 +7053,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -6904,7 +7138,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7014,7 +7248,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7085,7 +7319,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7171,7 +7405,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7244,7 +7478,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7341,7 +7575,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7401,7 +7635,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 54161c4262..845ebef2ef 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -4295,7 +4295,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4361,7 +4361,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4558,7 +4558,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 114, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -6409,6 +6409,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -6644,6 +6646,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -7821,7 +7825,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -7852,6 +7856,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -7901,6 +7950,14 @@ "description": "Document data as JSON object.", "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -7909,11 +7966,192 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } } @@ -8134,7 +8372,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8740,7 +8978,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 116, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8903,7 +9141,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 115, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -8984,7 +9222,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9056,7 +9294,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9302,7 +9540,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9350,7 +9588,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9399,7 +9637,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -9498,7 +9736,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -9557,7 +9795,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 294, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -9628,7 +9866,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9686,7 +9924,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9909,7 +10147,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9969,7 +10207,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10051,7 +10289,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10146,7 +10384,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10214,7 +10452,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10275,7 +10513,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10338,7 +10576,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10422,7 +10660,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10485,7 +10723,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -10557,7 +10795,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10642,7 +10880,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10756,7 +10994,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10820,7 +11058,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10890,7 +11128,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10971,7 +11209,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11029,7 +11267,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11114,7 +11352,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11182,7 +11420,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11267,7 +11505,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11337,7 +11575,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -11388,7 +11626,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -11439,7 +11677,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -11487,7 +11725,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -11535,7 +11773,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11583,7 +11821,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11642,7 +11880,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11690,7 +11928,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11738,7 +11976,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11799,7 +12037,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11860,7 +12098,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11932,7 +12170,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11993,7 +12231,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12081,7 +12319,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12142,7 +12380,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12203,7 +12441,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12264,7 +12502,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12325,7 +12563,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12386,7 +12624,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12447,7 +12685,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12508,7 +12746,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12569,7 +12807,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12630,7 +12868,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12678,7 +12916,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12726,7 +12964,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12774,7 +13012,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12825,7 +13063,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12876,7 +13114,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12927,7 +13165,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12978,7 +13216,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13029,7 +13267,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13080,7 +13318,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13131,7 +13369,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13182,7 +13420,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -13257,7 +13495,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -13400,7 +13638,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13545,7 +13783,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -13718,7 +13956,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13895,7 +14133,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -14003,7 +14241,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14114,7 +14352,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14166,7 +14404,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14227,7 +14465,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -14301,7 +14539,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14375,7 +14613,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14450,7 +14688,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14554,7 +14792,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -14661,7 +14899,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -14745,7 +14983,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -14832,7 +15070,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -14946,7 +15184,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15063,7 +15301,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -15157,7 +15395,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15254,7 +15492,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -15358,7 +15596,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15465,7 +15703,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -15607,7 +15845,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15751,7 +15989,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15845,7 +16083,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15942,7 +16180,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16036,7 +16274,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16133,7 +16371,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16227,7 +16465,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16324,7 +16562,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -16418,7 +16656,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16515,7 +16753,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -16567,7 +16805,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16628,7 +16866,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16702,7 +16940,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16776,7 +17014,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16849,7 +17087,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16931,7 +17169,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16990,7 +17228,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17066,7 +17304,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17127,7 +17365,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17201,7 +17439,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17284,7 +17522,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17373,7 +17611,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17435,7 +17673,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17509,7 +17747,7 @@ }, "x-appwrite": { "method": "list", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -17582,7 +17820,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -17669,7 +17907,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17761,7 +17999,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -17836,7 +18074,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -17907,7 +18145,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18017,7 +18255,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 343, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -18149,7 +18387,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18253,7 +18491,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 342, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -18376,7 +18614,7 @@ }, "x-appwrite": { "method": "get", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18433,7 +18671,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 344, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -18483,7 +18721,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 345, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -18542,7 +18780,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -18629,7 +18867,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -18674,7 +18912,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -18746,7 +18984,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -18803,7 +19041,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -18877,7 +19115,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -18936,7 +19174,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -19007,7 +19245,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -19141,7 +19379,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -19198,7 +19436,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19312,7 +19550,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -19371,7 +19609,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -19462,7 +19700,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -19540,7 +19778,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -19618,7 +19856,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -19696,7 +19934,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -19774,7 +20012,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -19864,7 +20102,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -19945,7 +20183,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20023,7 +20261,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20101,7 +20339,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20179,7 +20417,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20257,7 +20495,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20356,7 +20594,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -20442,7 +20680,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -20499,7 +20737,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -20591,7 +20829,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -20658,7 +20896,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -20751,7 +20989,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -20820,7 +21058,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20956,7 +21194,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21013,7 +21251,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -21131,7 +21369,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -21198,7 +21436,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -21292,7 +21530,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -21361,7 +21599,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -21460,7 +21698,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -21538,7 +21776,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -21655,7 +21893,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -21785,7 +22023,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -21863,7 +22101,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -22086,7 +22324,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -22349,7 +22587,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -22574,7 +22812,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -22794,7 +23032,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -23033,7 +23271,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -23255,7 +23493,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -23312,7 +23550,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -23426,7 +23664,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -23493,7 +23731,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -23608,7 +23846,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -23677,7 +23915,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -23746,7 +23984,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -23817,7 +24055,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -23900,7 +24138,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -23950,7 +24188,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 319, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -24009,7 +24247,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 320, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -24068,7 +24306,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -24140,7 +24378,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24266,7 +24504,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24324,7 +24562,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24447,7 +24685,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -24507,7 +24745,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -24592,7 +24830,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -24689,7 +24927,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -24760,7 +24998,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24848,7 +25086,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24914,7 +25152,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -24980,7 +25218,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -25196,7 +25434,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -25269,7 +25507,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -25340,7 +25578,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25421,7 +25659,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25496,7 +25734,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25580,7 +25818,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -25641,7 +25879,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25714,7 +25952,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -25777,7 +26015,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -25849,7 +26087,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -25934,7 +26172,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -26044,7 +26282,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -26115,7 +26353,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -26201,7 +26439,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -26274,7 +26512,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -26370,7 +26608,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -26429,7 +26667,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -26509,7 +26747,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -26581,7 +26819,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -26668,7 +26906,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -26752,7 +26990,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -26836,7 +27074,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -26903,7 +27141,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -26963,7 +27201,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -27047,7 +27285,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -27131,7 +27369,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -27245,7 +27483,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -27347,7 +27585,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -27451,7 +27689,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -27522,7 +27760,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -27573,7 +27811,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -27633,7 +27871,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -27712,7 +27950,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -27793,7 +28031,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -27875,7 +28113,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -27948,7 +28186,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -28008,7 +28246,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -28080,7 +28318,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -28155,7 +28393,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -28215,7 +28453,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -28273,7 +28511,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -28331,7 +28569,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -28391,7 +28629,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -28470,7 +28708,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -28549,7 +28787,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -28628,7 +28866,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -28686,7 +28924,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -28765,7 +29003,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -28823,7 +29061,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -28874,7 +29112,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -28927,7 +29165,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -28997,7 +29235,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -29076,7 +29314,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -29148,7 +29386,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -29257,7 +29495,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29326,7 +29564,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29414,7 +29652,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -29485,7 +29723,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -29566,7 +29804,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -29645,7 +29883,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -29724,7 +29962,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -29792,7 +30030,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -29876,7 +30114,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -29945,7 +30183,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -30014,7 +30252,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -30094,7 +30332,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -30172,7 +30410,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -30260,7 +30498,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -30333,7 +30571,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -30383,7 +30621,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -36626,15 +36864,13 @@ }, "x-example": [] }, - "imageTransformations": { - "type": "array", - "description": "An array of aggregated number of image transformations.", - "items": { - "$ref": "#\/components\/schemas\/metric" - }, - "x-example": [] - }, "imageTransformationsTotal": { + "type": "integer", + "description": "An array of aggregated number of image transformations.", + "x-example": 0, + "format": "int32" + }, + "imageTransformations": { "type": "integer", "description": "Total aggregated number of image transformations.", "x-example": 0, @@ -36671,8 +36907,8 @@ "authPhoneCountryBreakdown", "databasesReads", "databasesWrites", - "imageTransformations", - "imageTransformationsTotal" + "imageTransformationsTotal", + "imageTransformations" ] }, "headers": { diff --git a/app/config/specs/open-api3-1.6.x-server.json b/app/config/specs/open-api3-1.6.x-server.json index 3d32d3e978..120be407a2 100644 --- a/app/config/specs/open-api3-1.6.x-server.json +++ b/app/config/specs/open-api3-1.6.x-server.json @@ -5953,6 +5953,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -6190,6 +6192,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -7379,7 +7383,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -7410,6 +7414,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Session": [] @@ -7461,6 +7510,14 @@ "description": "Document data as JSON object.", "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -7469,11 +7526,196 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } } @@ -7698,7 +7940,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8136,7 +8378,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8209,7 +8451,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8456,7 +8698,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8505,7 +8747,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8555,7 +8797,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -8614,7 +8856,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -8838,7 +9080,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -8899,7 +9141,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -8982,7 +9224,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9078,7 +9320,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9147,7 +9389,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9209,7 +9451,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9273,7 +9515,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9358,7 +9600,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9422,7 +9664,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -9495,7 +9737,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -9582,7 +9824,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -9698,7 +9940,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -9764,7 +10006,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -9835,7 +10077,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -9894,7 +10136,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -9980,7 +10222,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10049,7 +10291,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10135,7 +10377,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10206,7 +10448,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10259,7 +10501,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10312,7 +10554,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10361,7 +10603,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -10410,7 +10652,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -10459,7 +10701,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -10519,7 +10761,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -10568,7 +10810,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -10617,7 +10859,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -10679,7 +10921,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10741,7 +10983,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -10814,7 +11056,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -10876,7 +11118,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -10965,7 +11207,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11027,7 +11269,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11089,7 +11331,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11151,7 +11393,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11213,7 +11455,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11275,7 +11517,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11337,7 +11579,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11399,7 +11641,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11461,7 +11703,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11523,7 +11765,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11572,7 +11814,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -11621,7 +11863,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11670,7 +11912,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -11723,7 +11965,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -11776,7 +12018,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -11829,7 +12071,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -11882,7 +12124,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -11935,7 +12177,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -11988,7 +12230,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12041,7 +12283,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12094,7 +12336,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -12170,7 +12412,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -12314,7 +12556,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12460,7 +12702,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -12634,7 +12876,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -12812,7 +13054,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -12921,7 +13163,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13033,7 +13275,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13086,7 +13328,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13148,7 +13390,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -13223,7 +13465,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13298,7 +13540,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13374,7 +13616,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13479,7 +13721,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -13587,7 +13829,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -13672,7 +13914,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -13760,7 +14002,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -13875,7 +14117,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13993,7 +14235,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -14088,7 +14330,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14186,7 +14428,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -14291,7 +14533,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14399,7 +14641,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -14542,7 +14784,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14687,7 +14929,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -14782,7 +15024,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14880,7 +15122,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -14975,7 +15217,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15073,7 +15315,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15168,7 +15410,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15266,7 +15508,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15361,7 +15603,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15459,7 +15701,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15512,7 +15754,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15574,7 +15816,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15649,7 +15891,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -15724,7 +15966,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15798,7 +16040,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15881,7 +16123,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -15941,7 +16183,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16018,7 +16260,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16080,7 +16322,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16155,7 +16397,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16239,7 +16481,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16330,7 +16572,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16393,7 +16635,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16469,7 +16711,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -16542,7 +16784,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -16669,7 +16911,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -16728,7 +16970,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -16852,7 +17094,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -16913,7 +17155,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -17000,7 +17242,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -17099,7 +17341,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -17172,7 +17414,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -17262,7 +17504,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -17330,7 +17572,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -17398,7 +17640,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -17616,7 +17858,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -17691,7 +17933,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -17768,7 +18010,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -17854,7 +18096,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -17917,7 +18159,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -17992,7 +18234,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18057,7 +18299,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -18144,7 +18386,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18256,7 +18498,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -18329,7 +18571,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -18417,7 +18659,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -18492,7 +18734,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -18590,7 +18832,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -18651,7 +18893,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -18733,7 +18975,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -18806,7 +19048,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -18894,7 +19136,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -18979,7 +19221,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19064,7 +19306,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -19132,7 +19374,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -19193,7 +19435,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -19278,7 +19520,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -19363,7 +19605,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -19478,7 +19720,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -19581,7 +19823,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -19686,7 +19928,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -19738,7 +19980,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -19799,7 +20041,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -19879,7 +20121,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -19961,7 +20203,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -20044,7 +20286,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20118,7 +20360,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -20179,7 +20421,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -20252,7 +20494,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -20328,7 +20570,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -20389,7 +20631,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -20448,7 +20690,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -20507,7 +20749,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -20568,7 +20810,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -20648,7 +20890,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -20728,7 +20970,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -20808,7 +21050,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -20867,7 +21109,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -20947,7 +21189,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21006,7 +21248,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21058,7 +21300,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21112,7 +21354,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -21183,7 +21425,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -21263,7 +21505,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -21336,7 +21578,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -21446,7 +21688,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -21516,7 +21758,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -21605,7 +21847,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21677,7 +21919,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -21759,7 +22001,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -21839,7 +22081,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 316fe13116..0b92434498 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4367,7 +4367,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -4398,6 +4398,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -4447,6 +4492,14 @@ "description": "Document data as JSON object.", "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -4455,11 +4508,192 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } } @@ -4680,7 +4914,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -4763,7 +4997,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -4848,7 +5082,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -4962,7 +5196,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5035,7 +5269,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5086,7 +5320,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5137,7 +5371,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5188,7 +5422,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5239,7 +5473,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5290,7 +5524,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5341,7 +5575,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5392,7 +5626,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5443,7 +5677,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5494,7 +5728,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5545,7 +5779,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -5627,7 +5861,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -5701,7 +5935,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -5786,7 +6020,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -5883,7 +6117,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -5954,7 +6188,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6042,7 +6276,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6108,7 +6342,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6174,7 +6408,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6390,7 +6624,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6463,7 +6697,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6538,7 +6772,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6622,7 +6856,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6683,7 +6917,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6756,7 +6990,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -6819,7 +7053,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -6904,7 +7138,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7014,7 +7248,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7085,7 +7319,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7171,7 +7405,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7244,7 +7478,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7341,7 +7575,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7401,7 +7635,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 54161c4262..53c3efaf07 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -4295,7 +4295,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4361,7 +4361,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4558,7 +4558,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 114, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -7821,7 +7821,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -7852,6 +7852,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -7901,6 +7946,14 @@ "description": "Document data as JSON object.", "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -7909,11 +7962,192 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } } @@ -8134,7 +8368,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8740,7 +8974,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 116, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -8903,7 +9137,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 115, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -8984,7 +9218,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9056,7 +9290,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9302,7 +9536,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9350,7 +9584,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9399,7 +9633,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -9498,7 +9732,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -9557,7 +9791,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 294, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -9628,7 +9862,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9686,7 +9920,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9909,7 +10143,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9969,7 +10203,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10051,7 +10285,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10146,7 +10380,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10214,7 +10448,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10275,7 +10509,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10338,7 +10572,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10422,7 +10656,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10485,7 +10719,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -10557,7 +10791,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10642,7 +10876,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10756,7 +10990,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -10820,7 +11054,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10890,7 +11124,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -10971,7 +11205,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11029,7 +11263,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11114,7 +11348,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11182,7 +11416,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11267,7 +11501,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11337,7 +11571,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -11388,7 +11622,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -11439,7 +11673,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -11487,7 +11721,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -11535,7 +11769,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11583,7 +11817,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11642,7 +11876,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11690,7 +11924,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11738,7 +11972,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -11799,7 +12033,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -11860,7 +12094,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11932,7 +12166,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11993,7 +12227,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12081,7 +12315,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12142,7 +12376,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12203,7 +12437,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12264,7 +12498,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12325,7 +12559,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12386,7 +12620,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12447,7 +12681,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12508,7 +12742,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12569,7 +12803,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12630,7 +12864,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12678,7 +12912,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12726,7 +12960,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -12774,7 +13008,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -12825,7 +13059,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12876,7 +13110,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12927,7 +13161,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12978,7 +13212,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13029,7 +13263,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13080,7 +13314,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13131,7 +13365,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13182,7 +13416,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -13257,7 +13491,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -13400,7 +13634,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13545,7 +13779,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -13718,7 +13952,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13895,7 +14129,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -14003,7 +14237,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14114,7 +14348,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14166,7 +14400,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14227,7 +14461,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -14301,7 +14535,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14375,7 +14609,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14450,7 +14684,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14554,7 +14788,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -14661,7 +14895,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -14745,7 +14979,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -14832,7 +15066,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -14946,7 +15180,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15063,7 +15297,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -15157,7 +15391,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15254,7 +15488,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -15358,7 +15592,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15465,7 +15699,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -15607,7 +15841,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15751,7 +15985,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15845,7 +16079,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15942,7 +16176,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16036,7 +16270,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16133,7 +16367,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16227,7 +16461,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16324,7 +16558,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -16418,7 +16652,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16515,7 +16749,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -16567,7 +16801,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16628,7 +16862,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16702,7 +16936,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16776,7 +17010,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16849,7 +17083,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16931,7 +17165,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16990,7 +17224,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17066,7 +17300,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17127,7 +17361,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17201,7 +17435,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17284,7 +17518,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17373,7 +17607,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17435,7 +17669,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17509,7 +17743,7 @@ }, "x-appwrite": { "method": "list", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -17582,7 +17816,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -17669,7 +17903,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -17761,7 +17995,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -17836,7 +18070,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -17907,7 +18141,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18017,7 +18251,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 343, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -18149,7 +18383,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18253,7 +18487,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 342, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -18376,7 +18610,7 @@ }, "x-appwrite": { "method": "get", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18433,7 +18667,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 344, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -18483,7 +18717,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 345, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -18542,7 +18776,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -18629,7 +18863,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -18674,7 +18908,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -18746,7 +18980,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -18803,7 +19037,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -18877,7 +19111,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -18936,7 +19170,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -19007,7 +19241,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -19141,7 +19375,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -19198,7 +19432,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19312,7 +19546,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -19371,7 +19605,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -19462,7 +19696,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -19540,7 +19774,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -19618,7 +19852,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -19696,7 +19930,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -19774,7 +20008,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -19864,7 +20098,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -19945,7 +20179,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20023,7 +20257,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20101,7 +20335,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20179,7 +20413,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20257,7 +20491,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20356,7 +20590,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -20442,7 +20676,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -20499,7 +20733,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -20591,7 +20825,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -20658,7 +20892,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -20751,7 +20985,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -20820,7 +21054,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -20956,7 +21190,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21013,7 +21247,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -21131,7 +21365,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -21198,7 +21432,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -21292,7 +21526,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -21361,7 +21595,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -21460,7 +21694,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -21538,7 +21772,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -21655,7 +21889,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -21785,7 +22019,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -21863,7 +22097,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -22086,7 +22320,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -22349,7 +22583,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -22574,7 +22808,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -22794,7 +23028,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -23033,7 +23267,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -23255,7 +23489,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -23312,7 +23546,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -23426,7 +23660,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -23493,7 +23727,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -23608,7 +23842,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -23677,7 +23911,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -23746,7 +23980,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -23817,7 +24051,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -23900,7 +24134,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -23950,7 +24184,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 319, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -24009,7 +24243,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 320, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -24068,7 +24302,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -24140,7 +24374,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24266,7 +24500,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24324,7 +24558,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24447,7 +24681,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -24507,7 +24741,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -24592,7 +24826,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -24689,7 +24923,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -24760,7 +24994,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -24848,7 +25082,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -24914,7 +25148,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -24980,7 +25214,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -25196,7 +25430,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -25269,7 +25503,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -25340,7 +25574,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25421,7 +25655,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25496,7 +25730,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -25580,7 +25814,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -25641,7 +25875,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -25714,7 +25948,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -25777,7 +26011,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -25849,7 +26083,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -25934,7 +26168,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -26044,7 +26278,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -26115,7 +26349,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -26201,7 +26435,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -26274,7 +26508,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -26370,7 +26604,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -26429,7 +26663,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -26509,7 +26743,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -26581,7 +26815,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -26668,7 +26902,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -26752,7 +26986,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -26836,7 +27070,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -26903,7 +27137,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -26963,7 +27197,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -27047,7 +27281,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -27131,7 +27365,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -27245,7 +27479,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -27347,7 +27581,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -27451,7 +27685,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -27522,7 +27756,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -27573,7 +27807,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -27633,7 +27867,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -27712,7 +27946,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -27793,7 +28027,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -27875,7 +28109,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -27948,7 +28182,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -28008,7 +28242,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -28080,7 +28314,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -28155,7 +28389,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -28215,7 +28449,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -28273,7 +28507,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -28331,7 +28565,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -28391,7 +28625,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -28470,7 +28704,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -28549,7 +28783,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -28628,7 +28862,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -28686,7 +28920,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -28765,7 +28999,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -28823,7 +29057,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -28874,7 +29108,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -28927,7 +29161,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -28997,7 +29231,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -29076,7 +29310,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -29148,7 +29382,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -29257,7 +29491,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29326,7 +29560,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29414,7 +29648,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -29485,7 +29719,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -29566,7 +29800,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -29645,7 +29879,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -29724,7 +29958,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -29792,7 +30026,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -29876,7 +30110,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -29945,7 +30179,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -30014,7 +30248,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -30094,7 +30328,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -30172,7 +30406,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -30260,7 +30494,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -30333,7 +30567,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -30383,7 +30617,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 3d32d3e978..a27f5bbdcb 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -7379,7 +7379,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -7410,6 +7410,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Session": [] @@ -7461,6 +7506,14 @@ "description": "Document data as JSON object.", "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -7469,11 +7522,196 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + } + } + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } } @@ -7698,7 +7936,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8136,7 +8374,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8209,7 +8447,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8456,7 +8694,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8505,7 +8743,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8555,7 +8793,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -8614,7 +8852,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -8838,7 +9076,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -8899,7 +9137,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -8982,7 +9220,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9078,7 +9316,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9147,7 +9385,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9209,7 +9447,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9273,7 +9511,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9358,7 +9596,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9422,7 +9660,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -9495,7 +9733,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -9582,7 +9820,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -9698,7 +9936,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -9764,7 +10002,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -9835,7 +10073,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -9894,7 +10132,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -9980,7 +10218,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10049,7 +10287,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10135,7 +10373,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10206,7 +10444,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10259,7 +10497,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10312,7 +10550,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10361,7 +10599,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -10410,7 +10648,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -10459,7 +10697,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -10519,7 +10757,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -10568,7 +10806,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -10617,7 +10855,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -10679,7 +10917,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10741,7 +10979,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -10814,7 +11052,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -10876,7 +11114,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -10965,7 +11203,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11027,7 +11265,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11089,7 +11327,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11151,7 +11389,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11213,7 +11451,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11275,7 +11513,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11337,7 +11575,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11399,7 +11637,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11461,7 +11699,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11523,7 +11761,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11572,7 +11810,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -11621,7 +11859,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11670,7 +11908,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -11723,7 +11961,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -11776,7 +12014,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -11829,7 +12067,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -11882,7 +12120,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -11935,7 +12173,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -11988,7 +12226,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12041,7 +12279,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12094,7 +12332,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -12170,7 +12408,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -12314,7 +12552,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12460,7 +12698,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -12634,7 +12872,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -12812,7 +13050,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -12921,7 +13159,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13033,7 +13271,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13086,7 +13324,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13148,7 +13386,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -13223,7 +13461,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13298,7 +13536,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13374,7 +13612,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13479,7 +13717,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -13587,7 +13825,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -13672,7 +13910,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -13760,7 +13998,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -13875,7 +14113,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -13993,7 +14231,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -14088,7 +14326,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14186,7 +14424,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -14291,7 +14529,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14399,7 +14637,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -14542,7 +14780,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -14687,7 +14925,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -14782,7 +15020,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -14880,7 +15118,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -14975,7 +15213,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15073,7 +15311,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15168,7 +15406,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15266,7 +15504,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15361,7 +15599,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15459,7 +15697,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15512,7 +15750,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -15574,7 +15812,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -15649,7 +15887,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -15724,7 +15962,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -15798,7 +16036,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -15881,7 +16119,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -15941,7 +16179,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16018,7 +16256,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16080,7 +16318,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16155,7 +16393,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16239,7 +16477,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16330,7 +16568,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16393,7 +16631,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16469,7 +16707,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -16542,7 +16780,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -16669,7 +16907,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -16728,7 +16966,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -16852,7 +17090,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -16913,7 +17151,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -17000,7 +17238,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -17099,7 +17337,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -17172,7 +17410,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -17262,7 +17500,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -17330,7 +17568,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -17398,7 +17636,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -17616,7 +17854,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -17691,7 +17929,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -17768,7 +18006,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -17854,7 +18092,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -17917,7 +18155,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -17992,7 +18230,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18057,7 +18295,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -18144,7 +18382,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18256,7 +18494,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -18329,7 +18567,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -18417,7 +18655,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -18492,7 +18730,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -18590,7 +18828,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -18651,7 +18889,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -18733,7 +18971,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -18806,7 +19044,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -18894,7 +19132,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -18979,7 +19217,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19064,7 +19302,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -19132,7 +19370,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -19193,7 +19431,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -19278,7 +19516,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -19363,7 +19601,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -19478,7 +19716,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -19581,7 +19819,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -19686,7 +19924,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -19738,7 +19976,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -19799,7 +20037,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -19879,7 +20117,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -19961,7 +20199,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -20044,7 +20282,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20118,7 +20356,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -20179,7 +20417,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -20252,7 +20490,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -20328,7 +20566,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -20389,7 +20627,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -20448,7 +20686,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -20507,7 +20745,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -20568,7 +20806,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -20648,7 +20886,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -20728,7 +20966,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -20808,7 +21046,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -20867,7 +21105,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -20947,7 +21185,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21006,7 +21244,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21058,7 +21296,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21112,7 +21350,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -21183,7 +21421,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -21263,7 +21501,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -21336,7 +21574,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -21446,7 +21684,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -21516,7 +21754,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -21605,7 +21843,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -21677,7 +21915,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -21759,7 +21997,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -21839,7 +22077,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.6.x-client.json b/app/config/specs/swagger2-1.6.x-client.json index 8960bfaa5c..2f9375f3b9 100644 --- a/app/config/specs/swagger2-1.6.x-client.json +++ b/app/config/specs/swagger2-1.6.x-client.json @@ -4549,7 +4549,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -4576,6 +4576,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -4613,15 +4658,24 @@ "documentId": { "type": "string", "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, + "default": "", "x-example": "" }, "data": { "type": "object", "description": "Document data as JSON object.", - "default": {}, + "default": [], "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -4631,11 +4685,187 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } ] @@ -4850,7 +5080,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -4929,7 +5159,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -5011,7 +5241,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5359,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5200,7 +5430,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5273,7 +5503,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5346,7 +5576,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5399,7 +5629,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5452,7 +5682,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5505,7 +5735,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5558,7 +5788,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5611,7 +5841,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5664,7 +5894,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5717,7 +5947,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5770,7 +6000,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -5854,7 +6084,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -5926,7 +6156,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -6008,7 +6238,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -6099,7 +6329,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -6168,7 +6398,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6256,7 +6486,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6327,7 +6557,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6398,7 +6628,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6597,7 +6827,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6668,7 +6898,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6742,7 +6972,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6833,7 +7063,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6894,7 +7124,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6968,7 +7198,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7031,7 +7261,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7113,7 +7343,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7227,7 +7457,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7296,7 +7526,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7381,7 +7611,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7452,7 +7682,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7547,7 +7777,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7607,7 +7837,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index 8fc7e7daf3..fef7ff4ea5 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -4499,7 +4499,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4568,7 +4568,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4771,7 +4771,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 114, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -6609,6 +6609,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -6845,6 +6847,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -8010,7 +8014,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -8037,6 +8041,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -8074,15 +8123,24 @@ "documentId": { "type": "string", "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, + "default": "", "x-example": "" }, "data": { "type": "object", "description": "Document data as JSON object.", - "default": {}, + "default": [], "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -8092,11 +8150,187 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } ] @@ -8311,7 +8545,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8896,7 +9130,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 116, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -9054,7 +9288,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 115, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9133,7 +9367,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9204,7 +9438,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9474,7 +9708,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9524,7 +9758,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9575,7 +9809,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -9670,7 +9904,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -9729,7 +9963,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 294, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -9800,7 +10034,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9858,7 +10092,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10098,7 +10332,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10158,7 +10392,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10237,7 +10471,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10328,7 +10562,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10394,7 +10628,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10455,7 +10689,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10520,7 +10754,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10601,7 +10835,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10669,7 +10903,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -10739,7 +10973,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10821,7 +11055,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10939,7 +11173,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11003,7 +11237,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11071,7 +11305,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -11150,7 +11384,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11208,7 +11442,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11293,7 +11527,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11359,7 +11593,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11444,7 +11678,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11512,7 +11746,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -11585,7 +11819,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -11658,7 +11892,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -11708,7 +11942,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -11758,7 +11992,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11808,7 +12042,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11867,7 +12101,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11917,7 +12151,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11967,7 +12201,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12028,7 +12262,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12089,7 +12323,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12159,7 +12393,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12220,7 +12454,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12306,7 +12540,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12367,7 +12601,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12428,7 +12662,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12489,7 +12723,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12550,7 +12784,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12611,7 +12845,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12672,7 +12906,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12733,7 +12967,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12794,7 +13028,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12855,7 +13089,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12905,7 +13139,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12955,7 +13189,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -13005,7 +13239,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13058,7 +13292,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13111,7 +13345,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13164,7 +13398,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13217,7 +13451,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13270,7 +13504,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13323,7 +13557,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13376,7 +13610,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13429,7 +13663,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -13503,7 +13737,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -13660,7 +13894,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13814,7 +14048,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -14008,7 +14242,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -14201,7 +14435,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -14318,7 +14552,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14433,7 +14667,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14487,7 +14721,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14548,7 +14782,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -14621,7 +14855,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14694,7 +14928,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14768,7 +15002,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14882,7 +15116,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -14994,7 +15228,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15084,7 +15318,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15172,7 +15406,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -15298,7 +15532,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15422,7 +15656,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -15524,7 +15758,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15624,7 +15858,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -15738,7 +15972,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15850,7 +16084,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -16008,7 +16242,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -16163,7 +16397,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -16265,7 +16499,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -16365,7 +16599,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16467,7 +16701,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16567,7 +16801,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16669,7 +16903,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16769,7 +17003,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -16871,7 +17105,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16971,7 +17205,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -17025,7 +17259,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -17086,7 +17320,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -17159,7 +17393,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17232,7 +17466,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -17304,7 +17538,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17393,7 +17627,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17452,7 +17686,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17530,7 +17764,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17591,7 +17825,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17664,7 +17898,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17744,7 +17978,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17833,7 +18067,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17895,7 +18129,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17967,7 +18201,7 @@ }, "x-appwrite": { "method": "list", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -18039,7 +18273,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18132,7 +18366,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -18219,7 +18453,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -18298,7 +18532,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18368,7 +18602,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18488,7 +18722,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 343, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -18607,7 +18841,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18720,7 +18954,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 342, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -18832,7 +19066,7 @@ }, "x-appwrite": { "method": "get", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18889,7 +19123,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 344, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -18941,7 +19175,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 345, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -19000,7 +19234,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19083,7 +19317,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19130,7 +19364,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19206,7 +19440,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19263,7 +19497,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19339,7 +19573,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19398,7 +19632,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -19468,7 +19702,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -19617,7 +19851,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -19674,7 +19908,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19798,7 +20032,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -19857,7 +20091,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -19948,7 +20182,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -20025,7 +20259,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20102,7 +20336,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -20179,7 +20413,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20256,7 +20490,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20347,7 +20581,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -20427,7 +20661,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20504,7 +20738,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20581,7 +20815,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20658,7 +20892,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20735,7 +20969,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20831,7 +21065,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -20917,7 +21151,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -20974,7 +21208,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21067,7 +21301,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21132,7 +21366,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21226,7 +21460,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21293,7 +21527,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -21431,7 +21665,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21488,7 +21722,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -21609,7 +21843,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -21674,7 +21908,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -21770,7 +22004,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -21837,7 +22071,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -21936,7 +22170,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -22013,7 +22247,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22141,7 +22375,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22278,7 +22512,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -22355,7 +22589,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -22574,7 +22808,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -22836,7 +23070,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23057,7 +23291,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23273,7 +23507,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -23507,7 +23741,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -23725,7 +23959,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -23782,7 +24016,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -23901,7 +24135,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -23966,7 +24200,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24086,7 +24320,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -24153,7 +24387,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -24220,7 +24454,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -24290,7 +24524,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -24378,7 +24612,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -24430,7 +24664,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 319, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -24489,7 +24723,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 320, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -24548,7 +24782,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -24619,7 +24853,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24757,7 +24991,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24815,7 +25049,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24947,7 +25181,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -25007,7 +25241,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25089,7 +25323,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -25180,7 +25414,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -25249,7 +25483,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -25337,7 +25571,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -25408,7 +25642,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -25479,7 +25713,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -25678,7 +25912,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -25749,7 +25983,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -25820,7 +26054,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25899,7 +26133,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25973,7 +26207,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -26064,7 +26298,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -26125,7 +26359,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -26199,7 +26433,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -26262,7 +26496,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -26333,7 +26567,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -26415,7 +26649,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -26529,7 +26763,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -26598,7 +26832,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -26683,7 +26917,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -26754,7 +26988,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -26848,7 +27082,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -26907,7 +27141,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -26986,7 +27220,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -27057,7 +27291,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -27151,7 +27385,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -27241,7 +27475,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -27331,7 +27565,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -27399,7 +27633,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -27459,7 +27693,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -27549,7 +27783,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -27639,7 +27873,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -27764,7 +27998,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -27875,7 +28109,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -27986,7 +28220,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -28057,7 +28291,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -28110,7 +28344,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -28170,7 +28404,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -28248,7 +28482,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -28329,7 +28563,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -28410,7 +28644,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -28482,7 +28716,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -28542,7 +28776,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -28615,7 +28849,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -28688,7 +28922,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -28748,7 +28982,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -28806,7 +29040,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -28864,7 +29098,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -28924,7 +29158,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -29002,7 +29236,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -29080,7 +29314,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -29158,7 +29392,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -29216,7 +29450,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -29294,7 +29528,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -29352,7 +29586,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -29405,7 +29639,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -29460,7 +29694,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -29528,7 +29762,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -29606,7 +29840,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -29677,7 +29911,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -29789,7 +30023,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29856,7 +30090,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29945,7 +30179,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -30014,7 +30248,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30095,7 +30329,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -30173,7 +30407,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -30251,7 +30485,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -30317,7 +30551,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -30401,7 +30635,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -30468,7 +30702,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -30535,7 +30769,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -30611,7 +30845,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -30690,7 +30924,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -30775,7 +31009,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -30847,7 +31081,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -30899,7 +31133,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, @@ -37213,16 +37447,13 @@ }, "x-example": [] }, - "imageTransformations": { - "type": "array", - "description": "An array of aggregated number of image transformations.", - "items": { - "type": "object", - "$ref": "#\/definitions\/metric" - }, - "x-example": [] - }, "imageTransformationsTotal": { + "type": "integer", + "description": "An array of aggregated number of image transformations.", + "x-example": 0, + "format": "int32" + }, + "imageTransformations": { "type": "integer", "description": "Total aggregated number of image transformations.", "x-example": 0, @@ -37259,8 +37490,8 @@ "authPhoneCountryBreakdown", "databasesReads", "databasesWrites", - "imageTransformations", - "imageTransformationsTotal" + "imageTransformationsTotal", + "imageTransformations" ] }, "headers": { diff --git a/app/config/specs/swagger2-1.6.x-server.json b/app/config/specs/swagger2-1.6.x-server.json index 83757c94f4..3aaf42f08c 100644 --- a/app/config/specs/swagger2-1.6.x-server.json +++ b/app/config/specs/swagger2-1.6.x-server.json @@ -6135,6 +6135,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -6373,6 +6375,8 @@ }, "required": [ "required", + "min", + "max", "default" ] } @@ -7550,7 +7554,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -7577,6 +7581,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Session": [] @@ -7616,15 +7665,24 @@ "documentId": { "type": "string", "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, + "default": "", "x-example": "" }, "data": { "type": "object", "description": "Document data as JSON object.", - "default": {}, + "default": [], "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -7634,11 +7692,191 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } ] @@ -7857,7 +8095,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8282,7 +8520,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8354,7 +8592,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8625,7 +8863,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8676,7 +8914,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8728,7 +8966,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -8787,7 +9025,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9028,7 +9266,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9089,7 +9327,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9169,7 +9407,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9261,7 +9499,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9328,7 +9566,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9390,7 +9628,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9456,7 +9694,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9538,7 +9776,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9607,7 +9845,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -9678,7 +9916,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -9762,7 +10000,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -9882,7 +10120,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -9948,7 +10186,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10017,7 +10255,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10076,7 +10314,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10162,7 +10400,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10229,7 +10467,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10315,7 +10553,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10384,7 +10622,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10459,7 +10697,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10534,7 +10772,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10585,7 +10823,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -10636,7 +10874,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -10687,7 +10925,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -10747,7 +10985,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -10798,7 +11036,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -10849,7 +11087,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -10911,7 +11149,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10973,7 +11211,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11044,7 +11282,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11106,7 +11344,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -11193,7 +11431,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11255,7 +11493,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11317,7 +11555,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11379,7 +11617,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11441,7 +11679,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11503,7 +11741,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11565,7 +11803,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11627,7 +11865,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11689,7 +11927,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11751,7 +11989,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11802,7 +12040,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -11853,7 +12091,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11904,7 +12142,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -11959,7 +12197,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12014,7 +12252,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12069,7 +12307,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12124,7 +12362,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12179,7 +12417,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12234,7 +12472,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12289,7 +12527,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12344,7 +12582,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -12419,7 +12657,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -12577,7 +12815,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12732,7 +12970,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -12927,7 +13165,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13121,7 +13359,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -13239,7 +13477,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13355,7 +13593,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13410,7 +13648,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13472,7 +13710,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -13546,7 +13784,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13620,7 +13858,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13695,7 +13933,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13810,7 +14048,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -13923,7 +14161,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -14014,7 +14252,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -14103,7 +14341,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -14230,7 +14468,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14355,7 +14593,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -14458,7 +14696,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14559,7 +14797,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -14674,7 +14912,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14787,7 +15025,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -14946,7 +15184,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15102,7 +15340,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15205,7 +15443,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15306,7 +15544,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15409,7 +15647,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15510,7 +15748,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15613,7 +15851,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15714,7 +15952,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15817,7 +16055,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15918,7 +16156,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15973,7 +16211,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16035,7 +16273,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16109,7 +16347,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16183,7 +16421,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16256,7 +16494,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16346,7 +16584,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16406,7 +16644,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16485,7 +16723,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16547,7 +16785,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16621,7 +16859,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16702,7 +16940,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16793,7 +17031,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16856,7 +17094,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16930,7 +17168,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17002,7 +17240,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17141,7 +17379,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17200,7 +17438,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -17333,7 +17571,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17394,7 +17632,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -17478,7 +17716,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -17571,7 +17809,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -17642,7 +17880,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -17732,7 +17970,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -17805,7 +18043,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -17878,7 +18116,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18079,7 +18317,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -18152,7 +18390,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -18228,7 +18466,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18321,7 +18559,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -18384,7 +18622,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -18460,7 +18698,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18525,7 +18763,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -18609,7 +18847,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18725,7 +18963,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -18796,7 +19034,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -18883,7 +19121,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -18956,7 +19194,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -19052,7 +19290,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19113,7 +19351,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19194,7 +19432,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -19266,7 +19504,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -19361,7 +19599,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -19452,7 +19690,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19543,7 +19781,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -19612,7 +19850,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -19673,7 +19911,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -19764,7 +20002,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -19855,7 +20093,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -19981,7 +20219,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -20093,7 +20331,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20205,7 +20443,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -20259,7 +20497,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20320,7 +20558,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -20399,7 +20637,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20481,7 +20719,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -20563,7 +20801,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20636,7 +20874,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -20697,7 +20935,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -20771,7 +21009,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -20845,7 +21083,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -20906,7 +21144,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -20965,7 +21203,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21024,7 +21262,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21085,7 +21323,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21164,7 +21402,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21243,7 +21481,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -21322,7 +21560,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -21381,7 +21619,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -21460,7 +21698,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21519,7 +21757,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21573,7 +21811,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21629,7 +21867,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -21698,7 +21936,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -21777,7 +22015,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -21849,7 +22087,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -21962,7 +22200,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -22030,7 +22268,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22120,7 +22358,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -22190,7 +22428,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -22272,7 +22510,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22351,7 +22589,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 8960bfaa5c..2f9375f3b9 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4549,7 +4549,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -4576,6 +4576,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -4613,15 +4658,24 @@ "documentId": { "type": "string", "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, + "default": "", "x-example": "" }, "data": { "type": "object", "description": "Document data as JSON object.", - "default": {}, + "default": [], "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -4631,11 +4685,187 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } ] @@ -4850,7 +5080,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -4929,7 +5159,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -5011,7 +5241,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -5129,7 +5359,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -5200,7 +5430,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -5273,7 +5503,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -5346,7 +5576,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -5399,7 +5629,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -5452,7 +5682,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -5505,7 +5735,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -5558,7 +5788,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -5611,7 +5841,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -5664,7 +5894,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -5717,7 +5947,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -5770,7 +6000,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -5854,7 +6084,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -5926,7 +6156,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -6008,7 +6238,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -6099,7 +6329,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -6168,7 +6398,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -6256,7 +6486,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -6327,7 +6557,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -6398,7 +6628,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -6597,7 +6827,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -6668,7 +6898,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -6742,7 +6972,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -6833,7 +7063,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -6894,7 +7124,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -6968,7 +7198,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -7031,7 +7261,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -7113,7 +7343,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -7227,7 +7457,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -7296,7 +7526,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -7381,7 +7611,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -7452,7 +7682,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -7547,7 +7777,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -7607,7 +7837,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 8fc7e7daf3..118750f018 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4499,7 +4499,7 @@ }, "x-appwrite": { "method": "chat", - "weight": 333, + "weight": 335, "cookies": false, "type": "", "deprecated": false, @@ -4568,7 +4568,7 @@ }, "x-appwrite": { "method": "variables", - "weight": 332, + "weight": 334, "cookies": false, "type": "", "deprecated": false, @@ -4771,7 +4771,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 114, + "weight": 116, "cookies": false, "type": "", "deprecated": false, @@ -8010,7 +8010,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -8037,6 +8037,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [] } @@ -8074,15 +8119,24 @@ "documentId": { "type": "string", "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, + "default": "", "x-example": "" }, "data": { "type": "object", "description": "Document data as JSON object.", - "default": {}, + "default": [], "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -8092,11 +8146,187 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } ] @@ -8311,7 +8541,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8896,7 +9126,7 @@ }, "x-appwrite": { "method": "getCollectionUsage", - "weight": 116, + "weight": 118, "cookies": false, "type": "", "deprecated": false, @@ -9054,7 +9284,7 @@ }, "x-appwrite": { "method": "getDatabaseUsage", - "weight": 115, + "weight": 117, "cookies": false, "type": "", "deprecated": false, @@ -9133,7 +9363,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -9204,7 +9434,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -9474,7 +9704,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -9524,7 +9754,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -9575,7 +9805,7 @@ }, "x-appwrite": { "method": "listTemplates", - "weight": 314, + "weight": 316, "cookies": false, "type": "", "deprecated": false, @@ -9670,7 +9900,7 @@ }, "x-appwrite": { "method": "getTemplate", - "weight": 315, + "weight": 317, "cookies": false, "type": "", "deprecated": false, @@ -9729,7 +9959,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 294, + "weight": 296, "cookies": false, "type": "", "deprecated": false, @@ -9800,7 +10030,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -9858,7 +10088,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -10098,7 +10328,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -10158,7 +10388,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -10237,7 +10467,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -10328,7 +10558,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -10394,7 +10624,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -10455,7 +10685,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -10520,7 +10750,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -10601,7 +10831,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -10669,7 +10899,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -10739,7 +10969,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -10821,7 +11051,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -10939,7 +11169,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -11003,7 +11233,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -11071,7 +11301,7 @@ }, "x-appwrite": { "method": "getFunctionUsage", - "weight": 293, + "weight": 295, "cookies": false, "type": "", "deprecated": false, @@ -11150,7 +11380,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -11208,7 +11438,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -11293,7 +11523,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -11359,7 +11589,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -11444,7 +11674,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -11512,7 +11742,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -11585,7 +11815,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -11658,7 +11888,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -11708,7 +11938,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -11758,7 +11988,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -11808,7 +12038,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -11867,7 +12097,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -11917,7 +12147,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -11967,7 +12197,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -12028,7 +12258,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -12089,7 +12319,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -12159,7 +12389,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -12220,7 +12450,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -12306,7 +12536,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -12367,7 +12597,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -12428,7 +12658,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -12489,7 +12719,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -12550,7 +12780,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -12611,7 +12841,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -12672,7 +12902,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -12733,7 +12963,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -12794,7 +13024,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -12855,7 +13085,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -12905,7 +13135,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -12955,7 +13185,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -13005,7 +13235,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -13058,7 +13288,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -13111,7 +13341,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -13164,7 +13394,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -13217,7 +13447,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -13270,7 +13500,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -13323,7 +13553,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -13376,7 +13606,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -13429,7 +13659,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -13503,7 +13733,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -13660,7 +13890,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -13814,7 +14044,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -14008,7 +14238,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -14201,7 +14431,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -14318,7 +14548,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -14433,7 +14663,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -14487,7 +14717,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -14548,7 +14778,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -14621,7 +14851,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -14694,7 +14924,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -14768,7 +14998,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -14882,7 +15112,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -14994,7 +15224,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -15084,7 +15314,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -15172,7 +15402,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -15298,7 +15528,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -15422,7 +15652,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -15524,7 +15754,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -15624,7 +15854,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -15738,7 +15968,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -15850,7 +16080,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -16008,7 +16238,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -16163,7 +16393,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -16265,7 +16495,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -16365,7 +16595,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -16467,7 +16697,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -16567,7 +16797,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -16669,7 +16899,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -16769,7 +16999,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -16871,7 +17101,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -16971,7 +17201,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -17025,7 +17255,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -17086,7 +17316,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -17159,7 +17389,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -17232,7 +17462,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -17304,7 +17534,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -17393,7 +17623,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -17452,7 +17682,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -17530,7 +17760,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -17591,7 +17821,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -17664,7 +17894,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -17744,7 +17974,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -17833,7 +18063,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -17895,7 +18125,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -17967,7 +18197,7 @@ }, "x-appwrite": { "method": "list", - "weight": 338, + "weight": 340, "cookies": false, "type": "", "deprecated": false, @@ -18039,7 +18269,7 @@ }, "x-appwrite": { "method": "createAppwriteMigration", - "weight": 334, + "weight": 336, "cookies": false, "type": "", "deprecated": false, @@ -18132,7 +18362,7 @@ }, "x-appwrite": { "method": "getAppwriteReport", - "weight": 340, + "weight": 342, "cookies": false, "type": "", "deprecated": false, @@ -18219,7 +18449,7 @@ }, "x-appwrite": { "method": "createFirebaseMigration", - "weight": 335, + "weight": 337, "cookies": false, "type": "", "deprecated": false, @@ -18298,7 +18528,7 @@ }, "x-appwrite": { "method": "getFirebaseReport", - "weight": 341, + "weight": 343, "cookies": false, "type": "", "deprecated": false, @@ -18368,7 +18598,7 @@ }, "x-appwrite": { "method": "createNHostMigration", - "weight": 337, + "weight": 339, "cookies": false, "type": "", "deprecated": false, @@ -18488,7 +18718,7 @@ }, "x-appwrite": { "method": "getNHostReport", - "weight": 343, + "weight": 345, "cookies": false, "type": "", "deprecated": false, @@ -18607,7 +18837,7 @@ }, "x-appwrite": { "method": "createSupabaseMigration", - "weight": 336, + "weight": 338, "cookies": false, "type": "", "deprecated": false, @@ -18720,7 +18950,7 @@ }, "x-appwrite": { "method": "getSupabaseReport", - "weight": 342, + "weight": 344, "cookies": false, "type": "", "deprecated": false, @@ -18832,7 +19062,7 @@ }, "x-appwrite": { "method": "get", - "weight": 339, + "weight": 341, "cookies": false, "type": "", "deprecated": false, @@ -18889,7 +19119,7 @@ }, "x-appwrite": { "method": "retry", - "weight": 344, + "weight": 346, "cookies": false, "type": "", "deprecated": false, @@ -18941,7 +19171,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 345, + "weight": 347, "cookies": false, "type": "", "deprecated": false, @@ -19000,7 +19230,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 196, + "weight": 198, "cookies": false, "type": "", "deprecated": false, @@ -19083,7 +19313,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 198, + "weight": 200, "cookies": false, "type": "", "deprecated": false, @@ -19130,7 +19360,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 197, + "weight": 199, "cookies": false, "type": "", "deprecated": false, @@ -19206,7 +19436,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 199, + "weight": 201, "cookies": false, "type": "", "deprecated": false, @@ -19263,7 +19493,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 200, + "weight": 202, "cookies": false, "type": "", "deprecated": false, @@ -19339,7 +19569,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 201, + "weight": 203, "cookies": false, "type": "", "deprecated": false, @@ -19398,7 +19628,7 @@ }, "x-appwrite": { "method": "list", - "weight": 151, + "weight": 153, "cookies": false, "type": "", "deprecated": false, @@ -19468,7 +19698,7 @@ }, "x-appwrite": { "method": "create", - "weight": 150, + "weight": 152, "cookies": false, "type": "", "deprecated": false, @@ -19617,7 +19847,7 @@ }, "x-appwrite": { "method": "get", - "weight": 152, + "weight": 154, "cookies": false, "type": "", "deprecated": false, @@ -19674,7 +19904,7 @@ }, "x-appwrite": { "method": "update", - "weight": 153, + "weight": 155, "cookies": false, "type": "", "deprecated": false, @@ -19798,7 +20028,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 170, + "weight": 172, "cookies": false, "type": "", "deprecated": false, @@ -19857,7 +20087,7 @@ }, "x-appwrite": { "method": "updateApiStatus", - "weight": 157, + "weight": 159, "cookies": false, "type": "", "deprecated": false, @@ -19948,7 +20178,7 @@ }, "x-appwrite": { "method": "updateApiStatusAll", - "weight": 158, + "weight": 160, "cookies": false, "type": "", "deprecated": false, @@ -20025,7 +20255,7 @@ }, "x-appwrite": { "method": "updateAuthDuration", - "weight": 163, + "weight": 165, "cookies": false, "type": "", "deprecated": false, @@ -20102,7 +20332,7 @@ }, "x-appwrite": { "method": "updateAuthLimit", - "weight": 162, + "weight": 164, "cookies": false, "type": "", "deprecated": false, @@ -20179,7 +20409,7 @@ }, "x-appwrite": { "method": "updateAuthSessionsLimit", - "weight": 168, + "weight": 170, "cookies": false, "type": "", "deprecated": false, @@ -20256,7 +20486,7 @@ }, "x-appwrite": { "method": "updateMembershipsPrivacy", - "weight": 161, + "weight": 163, "cookies": false, "type": "", "deprecated": false, @@ -20347,7 +20577,7 @@ }, "x-appwrite": { "method": "updateMockNumbers", - "weight": 169, + "weight": 171, "cookies": false, "type": "", "deprecated": false, @@ -20427,7 +20657,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordDictionary", - "weight": 166, + "weight": 168, "cookies": false, "type": "", "deprecated": false, @@ -20504,7 +20734,7 @@ }, "x-appwrite": { "method": "updateAuthPasswordHistory", - "weight": 165, + "weight": 167, "cookies": false, "type": "", "deprecated": false, @@ -20581,7 +20811,7 @@ }, "x-appwrite": { "method": "updatePersonalDataCheck", - "weight": 167, + "weight": 169, "cookies": false, "type": "", "deprecated": false, @@ -20658,7 +20888,7 @@ }, "x-appwrite": { "method": "updateSessionAlerts", - "weight": 160, + "weight": 162, "cookies": false, "type": "", "deprecated": false, @@ -20735,7 +20965,7 @@ }, "x-appwrite": { "method": "updateAuthStatus", - "weight": 164, + "weight": 166, "cookies": false, "type": "", "deprecated": false, @@ -20831,7 +21061,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 182, + "weight": 184, "cookies": false, "type": "", "deprecated": false, @@ -20917,7 +21147,7 @@ }, "x-appwrite": { "method": "listKeys", - "weight": 178, + "weight": 180, "cookies": false, "type": "", "deprecated": false, @@ -20974,7 +21204,7 @@ }, "x-appwrite": { "method": "createKey", - "weight": 177, + "weight": 179, "cookies": false, "type": "", "deprecated": false, @@ -21067,7 +21297,7 @@ }, "x-appwrite": { "method": "getKey", - "weight": 179, + "weight": 181, "cookies": false, "type": "", "deprecated": false, @@ -21132,7 +21362,7 @@ }, "x-appwrite": { "method": "updateKey", - "weight": 180, + "weight": 182, "cookies": false, "type": "", "deprecated": false, @@ -21226,7 +21456,7 @@ }, "x-appwrite": { "method": "deleteKey", - "weight": 181, + "weight": 183, "cookies": false, "type": "", "deprecated": false, @@ -21293,7 +21523,7 @@ }, "x-appwrite": { "method": "updateOAuth2", - "weight": 159, + "weight": 161, "cookies": false, "type": "", "deprecated": false, @@ -21431,7 +21661,7 @@ }, "x-appwrite": { "method": "listPlatforms", - "weight": 184, + "weight": 186, "cookies": false, "type": "", "deprecated": false, @@ -21488,7 +21718,7 @@ }, "x-appwrite": { "method": "createPlatform", - "weight": 183, + "weight": 185, "cookies": false, "type": "", "deprecated": false, @@ -21609,7 +21839,7 @@ }, "x-appwrite": { "method": "getPlatform", - "weight": 185, + "weight": 187, "cookies": false, "type": "", "deprecated": false, @@ -21674,7 +21904,7 @@ }, "x-appwrite": { "method": "updatePlatform", - "weight": 186, + "weight": 188, "cookies": false, "type": "", "deprecated": false, @@ -21770,7 +22000,7 @@ }, "x-appwrite": { "method": "deletePlatform", - "weight": 187, + "weight": 189, "cookies": false, "type": "", "deprecated": false, @@ -21837,7 +22067,7 @@ }, "x-appwrite": { "method": "updateServiceStatus", - "weight": 155, + "weight": 157, "cookies": false, "type": "", "deprecated": false, @@ -21936,7 +22166,7 @@ }, "x-appwrite": { "method": "updateServiceStatusAll", - "weight": 156, + "weight": 158, "cookies": false, "type": "", "deprecated": false, @@ -22013,7 +22243,7 @@ }, "x-appwrite": { "method": "updateSmtp", - "weight": 188, + "weight": 190, "cookies": false, "type": "", "deprecated": false, @@ -22141,7 +22371,7 @@ }, "x-appwrite": { "method": "createSmtpTest", - "weight": 189, + "weight": 191, "cookies": false, "type": "", "deprecated": false, @@ -22278,7 +22508,7 @@ }, "x-appwrite": { "method": "updateTeam", - "weight": 154, + "weight": 156, "cookies": false, "type": "", "deprecated": false, @@ -22355,7 +22585,7 @@ }, "x-appwrite": { "method": "getEmailTemplate", - "weight": 191, + "weight": 193, "cookies": false, "type": "", "deprecated": false, @@ -22574,7 +22804,7 @@ }, "x-appwrite": { "method": "updateEmailTemplate", - "weight": 193, + "weight": 195, "cookies": false, "type": "", "deprecated": false, @@ -22836,7 +23066,7 @@ }, "x-appwrite": { "method": "deleteEmailTemplate", - "weight": 195, + "weight": 197, "cookies": false, "type": "", "deprecated": false, @@ -23057,7 +23287,7 @@ }, "x-appwrite": { "method": "getSmsTemplate", - "weight": 190, + "weight": 192, "cookies": false, "type": "", "deprecated": false, @@ -23273,7 +23503,7 @@ }, "x-appwrite": { "method": "updateSmsTemplate", - "weight": 192, + "weight": 194, "cookies": false, "type": "", "deprecated": false, @@ -23507,7 +23737,7 @@ }, "x-appwrite": { "method": "deleteSmsTemplate", - "weight": 194, + "weight": 196, "cookies": false, "type": "", "deprecated": false, @@ -23725,7 +23955,7 @@ }, "x-appwrite": { "method": "listWebhooks", - "weight": 172, + "weight": 174, "cookies": false, "type": "", "deprecated": false, @@ -23782,7 +24012,7 @@ }, "x-appwrite": { "method": "createWebhook", - "weight": 171, + "weight": 173, "cookies": false, "type": "", "deprecated": false, @@ -23901,7 +24131,7 @@ }, "x-appwrite": { "method": "getWebhook", - "weight": 173, + "weight": 175, "cookies": false, "type": "", "deprecated": false, @@ -23966,7 +24196,7 @@ }, "x-appwrite": { "method": "updateWebhook", - "weight": 174, + "weight": 176, "cookies": false, "type": "", "deprecated": false, @@ -24086,7 +24316,7 @@ }, "x-appwrite": { "method": "deleteWebhook", - "weight": 176, + "weight": 178, "cookies": false, "type": "", "deprecated": false, @@ -24153,7 +24383,7 @@ }, "x-appwrite": { "method": "updateWebhookSignature", - "weight": 175, + "weight": 177, "cookies": false, "type": "", "deprecated": false, @@ -24220,7 +24450,7 @@ }, "x-appwrite": { "method": "listRules", - "weight": 317, + "weight": 319, "cookies": false, "type": "", "deprecated": false, @@ -24290,7 +24520,7 @@ }, "x-appwrite": { "method": "createRule", - "weight": 316, + "weight": 318, "cookies": false, "type": "", "deprecated": false, @@ -24378,7 +24608,7 @@ }, "x-appwrite": { "method": "getRule", - "weight": 318, + "weight": 320, "cookies": false, "type": "", "deprecated": false, @@ -24430,7 +24660,7 @@ }, "x-appwrite": { "method": "deleteRule", - "weight": 319, + "weight": 321, "cookies": false, "type": "", "deprecated": false, @@ -24489,7 +24719,7 @@ }, "x-appwrite": { "method": "updateRuleVerification", - "weight": 320, + "weight": 322, "cookies": false, "type": "", "deprecated": false, @@ -24548,7 +24778,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -24619,7 +24849,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -24757,7 +24987,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -24815,7 +25045,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -24947,7 +25177,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -25007,7 +25237,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -25089,7 +25319,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -25180,7 +25410,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -25249,7 +25479,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -25337,7 +25567,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -25408,7 +25638,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -25479,7 +25709,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -25678,7 +25908,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -25749,7 +25979,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 216, + "weight": 218, "cookies": false, "type": "", "deprecated": false, @@ -25820,7 +26050,7 @@ }, "x-appwrite": { "method": "getBucketUsage", - "weight": 217, + "weight": 219, "cookies": false, "type": "", "deprecated": false, @@ -25899,7 +26129,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -25973,7 +26203,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -26064,7 +26294,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -26125,7 +26355,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -26199,7 +26429,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -26262,7 +26492,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 231, + "weight": 233, "cookies": false, "type": "", "deprecated": false, @@ -26333,7 +26563,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -26415,7 +26645,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -26529,7 +26759,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -26598,7 +26828,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -26683,7 +26913,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -26754,7 +26984,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -26848,7 +27078,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -26907,7 +27137,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -26986,7 +27216,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -27057,7 +27287,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -27151,7 +27381,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -27241,7 +27471,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -27331,7 +27561,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -27399,7 +27629,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -27459,7 +27689,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -27549,7 +27779,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -27639,7 +27869,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -27764,7 +27994,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -27875,7 +28105,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -27986,7 +28216,7 @@ }, "x-appwrite": { "method": "getUsage", - "weight": 274, + "weight": 276, "cookies": false, "type": "", "deprecated": false, @@ -28057,7 +28287,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -28110,7 +28340,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -28170,7 +28400,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -28248,7 +28478,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -28329,7 +28559,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -28410,7 +28640,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -28482,7 +28712,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -28542,7 +28772,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -28615,7 +28845,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -28688,7 +28918,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -28748,7 +28978,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -28806,7 +29036,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -28864,7 +29094,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -28924,7 +29154,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -29002,7 +29232,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -29080,7 +29310,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -29158,7 +29388,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -29216,7 +29446,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -29294,7 +29524,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -29352,7 +29582,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -29405,7 +29635,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -29460,7 +29690,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -29528,7 +29758,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -29606,7 +29836,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -29677,7 +29907,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -29789,7 +30019,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -29856,7 +30086,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -29945,7 +30175,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -30014,7 +30244,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -30095,7 +30325,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -30173,7 +30403,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, @@ -30251,7 +30481,7 @@ }, "x-appwrite": { "method": "listRepositories", - "weight": 279, + "weight": 281, "cookies": false, "type": "", "deprecated": false, @@ -30317,7 +30547,7 @@ }, "x-appwrite": { "method": "createRepository", - "weight": 280, + "weight": 282, "cookies": false, "type": "", "deprecated": false, @@ -30401,7 +30631,7 @@ }, "x-appwrite": { "method": "getRepository", - "weight": 281, + "weight": 283, "cookies": false, "type": "", "deprecated": false, @@ -30468,7 +30698,7 @@ }, "x-appwrite": { "method": "listRepositoryBranches", - "weight": 282, + "weight": 284, "cookies": false, "type": "", "deprecated": false, @@ -30535,7 +30765,7 @@ }, "x-appwrite": { "method": "getRepositoryContents", - "weight": 277, + "weight": 279, "cookies": false, "type": "", "deprecated": false, @@ -30611,7 +30841,7 @@ }, "x-appwrite": { "method": "createRepositoryDetection", - "weight": 278, + "weight": 280, "cookies": false, "type": "", "deprecated": false, @@ -30690,7 +30920,7 @@ }, "x-appwrite": { "method": "updateExternalDeployments", - "weight": 287, + "weight": 289, "cookies": false, "type": "", "deprecated": false, @@ -30775,7 +31005,7 @@ }, "x-appwrite": { "method": "listInstallations", - "weight": 284, + "weight": 286, "cookies": false, "type": "", "deprecated": false, @@ -30847,7 +31077,7 @@ }, "x-appwrite": { "method": "getInstallation", - "weight": 285, + "weight": 287, "cookies": false, "type": "", "deprecated": false, @@ -30899,7 +31129,7 @@ }, "x-appwrite": { "method": "deleteInstallation", - "weight": 286, + "weight": 288, "cookies": false, "type": "", "deprecated": false, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 83757c94f4..cd0d0955cc 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -7550,7 +7550,7 @@ "tags": [ "databases" ], - "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n", "responses": { "201": { "description": "Document", @@ -7577,6 +7577,51 @@ "server" ], "packaging": false, + "methods": [ + { + "name": "createDocument", + "parameters": [ + "databaseId", + "collectionId", + "documentId", + "data", + "permissions" + ], + "required": [ + "databaseId", + "collectionId", + "documentId", + "data" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/document" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + }, + { + "name": "createDocuments", + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console.\n" + } + ], "auth": { "Project": [], "Session": [] @@ -7616,15 +7661,24 @@ "documentId": { "type": "string", "description": "Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", - "default": null, + "default": "", "x-example": "" }, "data": { "type": "object", "description": "Document data as JSON object.", - "default": {}, + "default": [], "x-example": "{}" }, + "documents": { + "type": "array", + "description": "Array of documents data as JSON object.", + "default": [], + "x-example": null, + "items": { + "type": "object" + } + }, "permissions": { "type": "array", "description": "An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).", @@ -7634,11 +7688,191 @@ "type": "string" } } - }, - "required": [ - "documentId", - "data" - ] + } + } + } + ] + }, + "patch": { + "summary": "Update documents", + "operationId": "databasesUpdateDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "updateDocuments", + "weight": 113, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/update-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/update-documents.md", + "rate-limit": 120, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "Key": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "databaseId", + "description": "Database ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "collectionId", + "description": "Collection ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "description": "Document data as JSON object. Include only attribute and value pairs to be updated.", + "default": [], + "x-example": "{}" + }, + "queries": { + "type": "array", + "description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + } + } + } + } + ] + }, + "delete": { + "summary": "Delete documents", + "operationId": "databasesDeleteDocuments", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "databases" + ], + "description": "Bulk delete documents using queries, if no queries are passed then all documents are deleted.", + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "x-appwrite": { + "method": "deleteDocuments", + "weight": 115, + "cookies": false, + "type": "", + "deprecated": false, + "demo": "databases\/delete-documents.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/databases\/delete-documents.md", + "rate-limit": 60, + "rate-time": 60, + "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", + "scope": "documents.write", + "platforms": [ + "client", + "server", + "server" + ], + "packaging": false, + "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" + } + } + } } } ] @@ -7857,7 +8091,7 @@ }, "x-appwrite": { "method": "deleteDocument", - "weight": 113, + "weight": 114, "cookies": false, "type": "", "deprecated": false, @@ -8282,7 +8516,7 @@ }, "x-appwrite": { "method": "list", - "weight": 289, + "weight": 291, "cookies": false, "type": "", "deprecated": false, @@ -8354,7 +8588,7 @@ }, "x-appwrite": { "method": "create", - "weight": 288, + "weight": 290, "cookies": false, "type": "", "deprecated": false, @@ -8625,7 +8859,7 @@ }, "x-appwrite": { "method": "listRuntimes", - "weight": 290, + "weight": 292, "cookies": false, "type": "", "deprecated": false, @@ -8676,7 +8910,7 @@ }, "x-appwrite": { "method": "listSpecifications", - "weight": 291, + "weight": 293, "cookies": false, "type": "", "deprecated": false, @@ -8728,7 +8962,7 @@ }, "x-appwrite": { "method": "get", - "weight": 292, + "weight": 294, "cookies": false, "type": "", "deprecated": false, @@ -8787,7 +9021,7 @@ }, "x-appwrite": { "method": "update", - "weight": 295, + "weight": 297, "cookies": false, "type": "", "deprecated": false, @@ -9028,7 +9262,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 298, + "weight": 300, "cookies": false, "type": "", "deprecated": false, @@ -9089,7 +9323,7 @@ }, "x-appwrite": { "method": "listDeployments", - "weight": 300, + "weight": 302, "cookies": false, "type": "", "deprecated": false, @@ -9169,7 +9403,7 @@ }, "x-appwrite": { "method": "createDeployment", - "weight": 299, + "weight": 301, "cookies": false, "type": "upload", "deprecated": false, @@ -9261,7 +9495,7 @@ }, "x-appwrite": { "method": "getDeployment", - "weight": 301, + "weight": 303, "cookies": false, "type": "", "deprecated": false, @@ -9328,7 +9562,7 @@ }, "x-appwrite": { "method": "updateDeployment", - "weight": 297, + "weight": 299, "cookies": false, "type": "", "deprecated": false, @@ -9390,7 +9624,7 @@ }, "x-appwrite": { "method": "deleteDeployment", - "weight": 302, + "weight": 304, "cookies": false, "type": "", "deprecated": false, @@ -9456,7 +9690,7 @@ }, "x-appwrite": { "method": "createBuild", - "weight": 303, + "weight": 305, "cookies": false, "type": "", "deprecated": false, @@ -9538,7 +9772,7 @@ }, "x-appwrite": { "method": "updateDeploymentBuild", - "weight": 304, + "weight": 306, "cookies": false, "type": "", "deprecated": false, @@ -9607,7 +9841,7 @@ }, "x-appwrite": { "method": "getDeploymentDownload", - "weight": 296, + "weight": 298, "cookies": false, "type": "location", "deprecated": false, @@ -9678,7 +9912,7 @@ }, "x-appwrite": { "method": "listExecutions", - "weight": 306, + "weight": 308, "cookies": false, "type": "", "deprecated": false, @@ -9762,7 +9996,7 @@ }, "x-appwrite": { "method": "createExecution", - "weight": 305, + "weight": 307, "cookies": false, "type": "", "deprecated": false, @@ -9882,7 +10116,7 @@ }, "x-appwrite": { "method": "getExecution", - "weight": 307, + "weight": 309, "cookies": false, "type": "", "deprecated": false, @@ -9948,7 +10182,7 @@ }, "x-appwrite": { "method": "deleteExecution", - "weight": 308, + "weight": 310, "cookies": false, "type": "", "deprecated": false, @@ -10017,7 +10251,7 @@ }, "x-appwrite": { "method": "listVariables", - "weight": 310, + "weight": 312, "cookies": false, "type": "", "deprecated": false, @@ -10076,7 +10310,7 @@ }, "x-appwrite": { "method": "createVariable", - "weight": 309, + "weight": 311, "cookies": false, "type": "", "deprecated": false, @@ -10162,7 +10396,7 @@ }, "x-appwrite": { "method": "getVariable", - "weight": 311, + "weight": 313, "cookies": false, "type": "", "deprecated": false, @@ -10229,7 +10463,7 @@ }, "x-appwrite": { "method": "updateVariable", - "weight": 312, + "weight": 314, "cookies": false, "type": "", "deprecated": false, @@ -10315,7 +10549,7 @@ }, "x-appwrite": { "method": "deleteVariable", - "weight": 313, + "weight": 315, "cookies": false, "type": "", "deprecated": false, @@ -10384,7 +10618,7 @@ }, "x-appwrite": { "method": "query", - "weight": 331, + "weight": 333, "cookies": false, "type": "graphql", "deprecated": false, @@ -10459,7 +10693,7 @@ }, "x-appwrite": { "method": "mutation", - "weight": 330, + "weight": 332, "cookies": false, "type": "graphql", "deprecated": false, @@ -10534,7 +10768,7 @@ }, "x-appwrite": { "method": "get", - "weight": 125, + "weight": 127, "cookies": false, "type": "", "deprecated": false, @@ -10585,7 +10819,7 @@ }, "x-appwrite": { "method": "getAntivirus", - "weight": 147, + "weight": 149, "cookies": false, "type": "", "deprecated": false, @@ -10636,7 +10870,7 @@ }, "x-appwrite": { "method": "getCache", - "weight": 128, + "weight": 130, "cookies": false, "type": "", "deprecated": false, @@ -10687,7 +10921,7 @@ }, "x-appwrite": { "method": "getCertificate", - "weight": 133, + "weight": 135, "cookies": false, "type": "", "deprecated": false, @@ -10747,7 +10981,7 @@ }, "x-appwrite": { "method": "getDB", - "weight": 127, + "weight": 129, "cookies": false, "type": "", "deprecated": false, @@ -10798,7 +11032,7 @@ }, "x-appwrite": { "method": "getPubSub", - "weight": 129, + "weight": 131, "cookies": false, "type": "", "deprecated": false, @@ -10849,7 +11083,7 @@ }, "x-appwrite": { "method": "getQueueBuilds", - "weight": 135, + "weight": 137, "cookies": false, "type": "", "deprecated": false, @@ -10911,7 +11145,7 @@ }, "x-appwrite": { "method": "getQueueCertificates", - "weight": 134, + "weight": 136, "cookies": false, "type": "", "deprecated": false, @@ -10973,7 +11207,7 @@ }, "x-appwrite": { "method": "getQueueDatabases", - "weight": 136, + "weight": 138, "cookies": false, "type": "", "deprecated": false, @@ -11044,7 +11278,7 @@ }, "x-appwrite": { "method": "getQueueDeletes", - "weight": 137, + "weight": 139, "cookies": false, "type": "", "deprecated": false, @@ -11106,7 +11340,7 @@ }, "x-appwrite": { "method": "getFailedJobs", - "weight": 148, + "weight": 150, "cookies": false, "type": "", "deprecated": false, @@ -11193,7 +11427,7 @@ }, "x-appwrite": { "method": "getQueueFunctions", - "weight": 141, + "weight": 143, "cookies": false, "type": "", "deprecated": false, @@ -11255,7 +11489,7 @@ }, "x-appwrite": { "method": "getQueueLogs", - "weight": 132, + "weight": 134, "cookies": false, "type": "", "deprecated": false, @@ -11317,7 +11551,7 @@ }, "x-appwrite": { "method": "getQueueMails", - "weight": 138, + "weight": 140, "cookies": false, "type": "", "deprecated": false, @@ -11379,7 +11613,7 @@ }, "x-appwrite": { "method": "getQueueMessaging", - "weight": 139, + "weight": 141, "cookies": false, "type": "", "deprecated": false, @@ -11441,7 +11675,7 @@ }, "x-appwrite": { "method": "getQueueMigrations", - "weight": 140, + "weight": 142, "cookies": false, "type": "", "deprecated": false, @@ -11503,7 +11737,7 @@ }, "x-appwrite": { "method": "getQueueStatsResources", - "weight": 142, + "weight": 144, "cookies": false, "type": "", "deprecated": false, @@ -11565,7 +11799,7 @@ }, "x-appwrite": { "method": "getQueueUsage", - "weight": 143, + "weight": 145, "cookies": false, "type": "", "deprecated": false, @@ -11627,7 +11861,7 @@ }, "x-appwrite": { "method": "getQueueStatsUsageDump", - "weight": 144, + "weight": 146, "cookies": false, "type": "", "deprecated": false, @@ -11689,7 +11923,7 @@ }, "x-appwrite": { "method": "getQueueWebhooks", - "weight": 131, + "weight": 133, "cookies": false, "type": "", "deprecated": false, @@ -11751,7 +11985,7 @@ }, "x-appwrite": { "method": "getStorage", - "weight": 146, + "weight": 148, "cookies": false, "type": "", "deprecated": false, @@ -11802,7 +12036,7 @@ }, "x-appwrite": { "method": "getStorageLocal", - "weight": 145, + "weight": 147, "cookies": false, "type": "", "deprecated": false, @@ -11853,7 +12087,7 @@ }, "x-appwrite": { "method": "getTime", - "weight": 130, + "weight": 132, "cookies": false, "type": "", "deprecated": false, @@ -11904,7 +12138,7 @@ }, "x-appwrite": { "method": "get", - "weight": 117, + "weight": 119, "cookies": false, "type": "", "deprecated": false, @@ -11959,7 +12193,7 @@ }, "x-appwrite": { "method": "listCodes", - "weight": 118, + "weight": 120, "cookies": false, "type": "", "deprecated": false, @@ -12014,7 +12248,7 @@ }, "x-appwrite": { "method": "listContinents", - "weight": 122, + "weight": 124, "cookies": false, "type": "", "deprecated": false, @@ -12069,7 +12303,7 @@ }, "x-appwrite": { "method": "listCountries", - "weight": 119, + "weight": 121, "cookies": false, "type": "", "deprecated": false, @@ -12124,7 +12358,7 @@ }, "x-appwrite": { "method": "listCountriesEU", - "weight": 120, + "weight": 122, "cookies": false, "type": "", "deprecated": false, @@ -12179,7 +12413,7 @@ }, "x-appwrite": { "method": "listCountriesPhones", - "weight": 121, + "weight": 123, "cookies": false, "type": "", "deprecated": false, @@ -12234,7 +12468,7 @@ }, "x-appwrite": { "method": "listCurrencies", - "weight": 123, + "weight": 125, "cookies": false, "type": "", "deprecated": false, @@ -12289,7 +12523,7 @@ }, "x-appwrite": { "method": "listLanguages", - "weight": 124, + "weight": 126, "cookies": false, "type": "", "deprecated": false, @@ -12344,7 +12578,7 @@ }, "x-appwrite": { "method": "listMessages", - "weight": 384, + "weight": 386, "cookies": false, "type": "", "deprecated": false, @@ -12419,7 +12653,7 @@ }, "x-appwrite": { "method": "createEmail", - "weight": 381, + "weight": 383, "cookies": false, "type": "", "deprecated": false, @@ -12577,7 +12811,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 388, + "weight": 390, "cookies": false, "type": "", "deprecated": false, @@ -12732,7 +12966,7 @@ }, "x-appwrite": { "method": "createPush", - "weight": 383, + "weight": 385, "cookies": false, "type": "", "deprecated": false, @@ -12927,7 +13161,7 @@ }, "x-appwrite": { "method": "updatePush", - "weight": 390, + "weight": 392, "cookies": false, "type": "", "deprecated": false, @@ -13121,7 +13355,7 @@ }, "x-appwrite": { "method": "createSms", - "weight": 382, + "weight": 384, "cookies": false, "type": "", "deprecated": false, @@ -13239,7 +13473,7 @@ }, "x-appwrite": { "method": "updateSms", - "weight": 389, + "weight": 391, "cookies": false, "type": "", "deprecated": false, @@ -13355,7 +13589,7 @@ }, "x-appwrite": { "method": "getMessage", - "weight": 387, + "weight": 389, "cookies": false, "type": "", "deprecated": false, @@ -13410,7 +13644,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 391, + "weight": 393, "cookies": false, "type": "", "deprecated": false, @@ -13472,7 +13706,7 @@ }, "x-appwrite": { "method": "listMessageLogs", - "weight": 385, + "weight": 387, "cookies": false, "type": "", "deprecated": false, @@ -13546,7 +13780,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 386, + "weight": 388, "cookies": false, "type": "", "deprecated": false, @@ -13620,7 +13854,7 @@ }, "x-appwrite": { "method": "listProviders", - "weight": 356, + "weight": 358, "cookies": false, "type": "", "deprecated": false, @@ -13695,7 +13929,7 @@ }, "x-appwrite": { "method": "createApnsProvider", - "weight": 355, + "weight": 357, "cookies": false, "type": "", "deprecated": false, @@ -13810,7 +14044,7 @@ }, "x-appwrite": { "method": "updateApnsProvider", - "weight": 368, + "weight": 370, "cookies": false, "type": "", "deprecated": false, @@ -13923,7 +14157,7 @@ }, "x-appwrite": { "method": "createFcmProvider", - "weight": 354, + "weight": 356, "cookies": false, "type": "", "deprecated": false, @@ -14014,7 +14248,7 @@ }, "x-appwrite": { "method": "updateFcmProvider", - "weight": 367, + "weight": 369, "cookies": false, "type": "", "deprecated": false, @@ -14103,7 +14337,7 @@ }, "x-appwrite": { "method": "createMailgunProvider", - "weight": 346, + "weight": 348, "cookies": false, "type": "", "deprecated": false, @@ -14230,7 +14464,7 @@ }, "x-appwrite": { "method": "updateMailgunProvider", - "weight": 359, + "weight": 361, "cookies": false, "type": "", "deprecated": false, @@ -14355,7 +14589,7 @@ }, "x-appwrite": { "method": "createMsg91Provider", - "weight": 349, + "weight": 351, "cookies": false, "type": "", "deprecated": false, @@ -14458,7 +14692,7 @@ }, "x-appwrite": { "method": "updateMsg91Provider", - "weight": 362, + "weight": 364, "cookies": false, "type": "", "deprecated": false, @@ -14559,7 +14793,7 @@ }, "x-appwrite": { "method": "createSendgridProvider", - "weight": 347, + "weight": 349, "cookies": false, "type": "", "deprecated": false, @@ -14674,7 +14908,7 @@ }, "x-appwrite": { "method": "updateSendgridProvider", - "weight": 360, + "weight": 362, "cookies": false, "type": "", "deprecated": false, @@ -14787,7 +15021,7 @@ }, "x-appwrite": { "method": "createSmtpProvider", - "weight": 348, + "weight": 350, "cookies": false, "type": "", "deprecated": false, @@ -14946,7 +15180,7 @@ }, "x-appwrite": { "method": "updateSmtpProvider", - "weight": 361, + "weight": 363, "cookies": false, "type": "", "deprecated": false, @@ -15102,7 +15336,7 @@ }, "x-appwrite": { "method": "createTelesignProvider", - "weight": 350, + "weight": 352, "cookies": false, "type": "", "deprecated": false, @@ -15205,7 +15439,7 @@ }, "x-appwrite": { "method": "updateTelesignProvider", - "weight": 363, + "weight": 365, "cookies": false, "type": "", "deprecated": false, @@ -15306,7 +15540,7 @@ }, "x-appwrite": { "method": "createTextmagicProvider", - "weight": 351, + "weight": 353, "cookies": false, "type": "", "deprecated": false, @@ -15409,7 +15643,7 @@ }, "x-appwrite": { "method": "updateTextmagicProvider", - "weight": 364, + "weight": 366, "cookies": false, "type": "", "deprecated": false, @@ -15510,7 +15744,7 @@ }, "x-appwrite": { "method": "createTwilioProvider", - "weight": 352, + "weight": 354, "cookies": false, "type": "", "deprecated": false, @@ -15613,7 +15847,7 @@ }, "x-appwrite": { "method": "updateTwilioProvider", - "weight": 365, + "weight": 367, "cookies": false, "type": "", "deprecated": false, @@ -15714,7 +15948,7 @@ }, "x-appwrite": { "method": "createVonageProvider", - "weight": 353, + "weight": 355, "cookies": false, "type": "", "deprecated": false, @@ -15817,7 +16051,7 @@ }, "x-appwrite": { "method": "updateVonageProvider", - "weight": 366, + "weight": 368, "cookies": false, "type": "", "deprecated": false, @@ -15918,7 +16152,7 @@ }, "x-appwrite": { "method": "getProvider", - "weight": 358, + "weight": 360, "cookies": false, "type": "", "deprecated": false, @@ -15973,7 +16207,7 @@ }, "x-appwrite": { "method": "deleteProvider", - "weight": 369, + "weight": 371, "cookies": false, "type": "", "deprecated": false, @@ -16035,7 +16269,7 @@ }, "x-appwrite": { "method": "listProviderLogs", - "weight": 357, + "weight": 359, "cookies": false, "type": "", "deprecated": false, @@ -16109,7 +16343,7 @@ }, "x-appwrite": { "method": "listSubscriberLogs", - "weight": 378, + "weight": 380, "cookies": false, "type": "", "deprecated": false, @@ -16183,7 +16417,7 @@ }, "x-appwrite": { "method": "listTopics", - "weight": 371, + "weight": 373, "cookies": false, "type": "", "deprecated": false, @@ -16256,7 +16490,7 @@ }, "x-appwrite": { "method": "createTopic", - "weight": 370, + "weight": 372, "cookies": false, "type": "", "deprecated": false, @@ -16346,7 +16580,7 @@ }, "x-appwrite": { "method": "getTopic", - "weight": 373, + "weight": 375, "cookies": false, "type": "", "deprecated": false, @@ -16406,7 +16640,7 @@ }, "x-appwrite": { "method": "updateTopic", - "weight": 374, + "weight": 376, "cookies": false, "type": "", "deprecated": false, @@ -16485,7 +16719,7 @@ }, "x-appwrite": { "method": "deleteTopic", - "weight": 375, + "weight": 377, "cookies": false, "type": "", "deprecated": false, @@ -16547,7 +16781,7 @@ }, "x-appwrite": { "method": "listTopicLogs", - "weight": 372, + "weight": 374, "cookies": false, "type": "", "deprecated": false, @@ -16621,7 +16855,7 @@ }, "x-appwrite": { "method": "listSubscribers", - "weight": 377, + "weight": 379, "cookies": false, "type": "", "deprecated": false, @@ -16702,7 +16936,7 @@ }, "x-appwrite": { "method": "createSubscriber", - "weight": 376, + "weight": 378, "cookies": false, "type": "", "deprecated": false, @@ -16793,7 +17027,7 @@ }, "x-appwrite": { "method": "getSubscriber", - "weight": 379, + "weight": 381, "cookies": false, "type": "", "deprecated": false, @@ -16856,7 +17090,7 @@ }, "x-appwrite": { "method": "deleteSubscriber", - "weight": 380, + "weight": 382, "cookies": false, "type": "", "deprecated": false, @@ -16930,7 +17164,7 @@ }, "x-appwrite": { "method": "listBuckets", - "weight": 203, + "weight": 205, "cookies": false, "type": "", "deprecated": false, @@ -17002,7 +17236,7 @@ }, "x-appwrite": { "method": "createBucket", - "weight": 202, + "weight": 204, "cookies": false, "type": "", "deprecated": false, @@ -17141,7 +17375,7 @@ }, "x-appwrite": { "method": "getBucket", - "weight": 204, + "weight": 206, "cookies": false, "type": "", "deprecated": false, @@ -17200,7 +17434,7 @@ }, "x-appwrite": { "method": "updateBucket", - "weight": 205, + "weight": 207, "cookies": false, "type": "", "deprecated": false, @@ -17333,7 +17567,7 @@ }, "x-appwrite": { "method": "deleteBucket", - "weight": 206, + "weight": 208, "cookies": false, "type": "", "deprecated": false, @@ -17394,7 +17628,7 @@ }, "x-appwrite": { "method": "listFiles", - "weight": 208, + "weight": 210, "cookies": false, "type": "", "deprecated": false, @@ -17478,7 +17712,7 @@ }, "x-appwrite": { "method": "createFile", - "weight": 207, + "weight": 209, "cookies": false, "type": "upload", "deprecated": false, @@ -17571,7 +17805,7 @@ }, "x-appwrite": { "method": "getFile", - "weight": 209, + "weight": 211, "cookies": false, "type": "", "deprecated": false, @@ -17642,7 +17876,7 @@ }, "x-appwrite": { "method": "updateFile", - "weight": 214, + "weight": 216, "cookies": false, "type": "", "deprecated": false, @@ -17732,7 +17966,7 @@ }, "x-appwrite": { "method": "deleteFile", - "weight": 215, + "weight": 217, "cookies": false, "type": "", "deprecated": false, @@ -17805,7 +18039,7 @@ }, "x-appwrite": { "method": "getFileDownload", - "weight": 211, + "weight": 213, "cookies": false, "type": "location", "deprecated": false, @@ -17878,7 +18112,7 @@ }, "x-appwrite": { "method": "getFilePreview", - "weight": 210, + "weight": 212, "cookies": false, "type": "location", "deprecated": false, @@ -18079,7 +18313,7 @@ }, "x-appwrite": { "method": "getFileView", - "weight": 212, + "weight": 214, "cookies": false, "type": "location", "deprecated": false, @@ -18152,7 +18386,7 @@ }, "x-appwrite": { "method": "list", - "weight": 219, + "weight": 221, "cookies": false, "type": "", "deprecated": false, @@ -18228,7 +18462,7 @@ }, "x-appwrite": { "method": "create", - "weight": 218, + "weight": 220, "cookies": false, "type": "", "deprecated": false, @@ -18321,7 +18555,7 @@ }, "x-appwrite": { "method": "get", - "weight": 220, + "weight": 222, "cookies": false, "type": "", "deprecated": false, @@ -18384,7 +18618,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 222, + "weight": 224, "cookies": false, "type": "", "deprecated": false, @@ -18460,7 +18694,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 224, + "weight": 226, "cookies": false, "type": "", "deprecated": false, @@ -18525,7 +18759,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 226, + "weight": 228, "cookies": false, "type": "", "deprecated": false, @@ -18609,7 +18843,7 @@ }, "x-appwrite": { "method": "createMembership", - "weight": 225, + "weight": 227, "cookies": false, "type": "", "deprecated": false, @@ -18725,7 +18959,7 @@ }, "x-appwrite": { "method": "getMembership", - "weight": 227, + "weight": 229, "cookies": false, "type": "", "deprecated": false, @@ -18796,7 +19030,7 @@ }, "x-appwrite": { "method": "updateMembership", - "weight": 228, + "weight": 230, "cookies": false, "type": "", "deprecated": false, @@ -18883,7 +19117,7 @@ }, "x-appwrite": { "method": "deleteMembership", - "weight": 230, + "weight": 232, "cookies": false, "type": "", "deprecated": false, @@ -18956,7 +19190,7 @@ }, "x-appwrite": { "method": "updateMembershipStatus", - "weight": 229, + "weight": 231, "cookies": false, "type": "", "deprecated": false, @@ -19052,7 +19286,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 221, + "weight": 223, "cookies": false, "type": "", "deprecated": false, @@ -19113,7 +19347,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 223, + "weight": 225, "cookies": false, "type": "", "deprecated": false, @@ -19194,7 +19428,7 @@ }, "x-appwrite": { "method": "list", - "weight": 241, + "weight": 243, "cookies": false, "type": "", "deprecated": false, @@ -19266,7 +19500,7 @@ }, "x-appwrite": { "method": "create", - "weight": 232, + "weight": 234, "cookies": false, "type": "", "deprecated": false, @@ -19361,7 +19595,7 @@ }, "x-appwrite": { "method": "createArgon2User", - "weight": 235, + "weight": 237, "cookies": false, "type": "", "deprecated": false, @@ -19452,7 +19686,7 @@ }, "x-appwrite": { "method": "createBcryptUser", - "weight": 233, + "weight": 235, "cookies": false, "type": "", "deprecated": false, @@ -19543,7 +19777,7 @@ }, "x-appwrite": { "method": "listIdentities", - "weight": 249, + "weight": 251, "cookies": false, "type": "", "deprecated": false, @@ -19612,7 +19846,7 @@ }, "x-appwrite": { "method": "deleteIdentity", - "weight": 272, + "weight": 274, "cookies": false, "type": "", "deprecated": false, @@ -19673,7 +19907,7 @@ }, "x-appwrite": { "method": "createMD5User", - "weight": 234, + "weight": 236, "cookies": false, "type": "", "deprecated": false, @@ -19764,7 +19998,7 @@ }, "x-appwrite": { "method": "createPHPassUser", - "weight": 237, + "weight": 239, "cookies": false, "type": "", "deprecated": false, @@ -19855,7 +20089,7 @@ }, "x-appwrite": { "method": "createScryptUser", - "weight": 238, + "weight": 240, "cookies": false, "type": "", "deprecated": false, @@ -19981,7 +20215,7 @@ }, "x-appwrite": { "method": "createScryptModifiedUser", - "weight": 239, + "weight": 241, "cookies": false, "type": "", "deprecated": false, @@ -20093,7 +20327,7 @@ }, "x-appwrite": { "method": "createSHAUser", - "weight": 236, + "weight": 238, "cookies": false, "type": "", "deprecated": false, @@ -20205,7 +20439,7 @@ }, "x-appwrite": { "method": "get", - "weight": 242, + "weight": 244, "cookies": false, "type": "", "deprecated": false, @@ -20259,7 +20493,7 @@ }, "x-appwrite": { "method": "delete", - "weight": 270, + "weight": 272, "cookies": false, "type": "", "deprecated": false, @@ -20320,7 +20554,7 @@ }, "x-appwrite": { "method": "updateEmail", - "weight": 255, + "weight": 257, "cookies": false, "type": "", "deprecated": false, @@ -20399,7 +20633,7 @@ }, "x-appwrite": { "method": "createJWT", - "weight": 273, + "weight": 275, "cookies": false, "type": "", "deprecated": false, @@ -20481,7 +20715,7 @@ }, "x-appwrite": { "method": "updateLabels", - "weight": 251, + "weight": 253, "cookies": false, "type": "", "deprecated": false, @@ -20563,7 +20797,7 @@ }, "x-appwrite": { "method": "listLogs", - "weight": 247, + "weight": 249, "cookies": false, "type": "", "deprecated": false, @@ -20636,7 +20870,7 @@ }, "x-appwrite": { "method": "listMemberships", - "weight": 246, + "weight": 248, "cookies": false, "type": "", "deprecated": false, @@ -20697,7 +20931,7 @@ }, "x-appwrite": { "method": "updateMfa", - "weight": 260, + "weight": 262, "cookies": false, "type": "", "deprecated": false, @@ -20771,7 +21005,7 @@ }, "x-appwrite": { "method": "deleteMfaAuthenticator", - "weight": 265, + "weight": 267, "cookies": false, "type": "", "deprecated": false, @@ -20845,7 +21079,7 @@ }, "x-appwrite": { "method": "listMfaFactors", - "weight": 261, + "weight": 263, "cookies": false, "type": "", "deprecated": false, @@ -20906,7 +21140,7 @@ }, "x-appwrite": { "method": "getMfaRecoveryCodes", - "weight": 262, + "weight": 264, "cookies": false, "type": "", "deprecated": false, @@ -20965,7 +21199,7 @@ }, "x-appwrite": { "method": "updateMfaRecoveryCodes", - "weight": 264, + "weight": 266, "cookies": false, "type": "", "deprecated": false, @@ -21024,7 +21258,7 @@ }, "x-appwrite": { "method": "createMfaRecoveryCodes", - "weight": 263, + "weight": 265, "cookies": false, "type": "", "deprecated": false, @@ -21085,7 +21319,7 @@ }, "x-appwrite": { "method": "updateName", - "weight": 253, + "weight": 255, "cookies": false, "type": "", "deprecated": false, @@ -21164,7 +21398,7 @@ }, "x-appwrite": { "method": "updatePassword", - "weight": 254, + "weight": 256, "cookies": false, "type": "", "deprecated": false, @@ -21243,7 +21477,7 @@ }, "x-appwrite": { "method": "updatePhone", - "weight": 256, + "weight": 258, "cookies": false, "type": "", "deprecated": false, @@ -21322,7 +21556,7 @@ }, "x-appwrite": { "method": "getPrefs", - "weight": 243, + "weight": 245, "cookies": false, "type": "", "deprecated": false, @@ -21381,7 +21615,7 @@ }, "x-appwrite": { "method": "updatePrefs", - "weight": 258, + "weight": 260, "cookies": false, "type": "", "deprecated": false, @@ -21460,7 +21694,7 @@ }, "x-appwrite": { "method": "listSessions", - "weight": 245, + "weight": 247, "cookies": false, "type": "", "deprecated": false, @@ -21519,7 +21753,7 @@ }, "x-appwrite": { "method": "createSession", - "weight": 266, + "weight": 268, "cookies": false, "type": "", "deprecated": false, @@ -21573,7 +21807,7 @@ }, "x-appwrite": { "method": "deleteSessions", - "weight": 269, + "weight": 271, "cookies": false, "type": "", "deprecated": false, @@ -21629,7 +21863,7 @@ }, "x-appwrite": { "method": "deleteSession", - "weight": 268, + "weight": 270, "cookies": false, "type": "", "deprecated": false, @@ -21698,7 +21932,7 @@ }, "x-appwrite": { "method": "updateStatus", - "weight": 250, + "weight": 252, "cookies": false, "type": "", "deprecated": false, @@ -21777,7 +22011,7 @@ }, "x-appwrite": { "method": "listTargets", - "weight": 248, + "weight": 250, "cookies": false, "type": "", "deprecated": false, @@ -21849,7 +22083,7 @@ }, "x-appwrite": { "method": "createTarget", - "weight": 240, + "weight": 242, "cookies": false, "type": "", "deprecated": false, @@ -21962,7 +22196,7 @@ }, "x-appwrite": { "method": "getTarget", - "weight": 244, + "weight": 246, "cookies": false, "type": "", "deprecated": false, @@ -22030,7 +22264,7 @@ }, "x-appwrite": { "method": "updateTarget", - "weight": 259, + "weight": 261, "cookies": false, "type": "", "deprecated": false, @@ -22120,7 +22354,7 @@ }, "x-appwrite": { "method": "deleteTarget", - "weight": 271, + "weight": 273, "cookies": false, "type": "", "deprecated": false, @@ -22190,7 +22424,7 @@ }, "x-appwrite": { "method": "createToken", - "weight": 267, + "weight": 269, "cookies": false, "type": "", "deprecated": false, @@ -22272,7 +22506,7 @@ }, "x-appwrite": { "method": "updateEmailVerification", - "weight": 257, + "weight": 259, "cookies": false, "type": "", "deprecated": false, @@ -22351,7 +22585,7 @@ }, "x-appwrite": { "method": "updatePhoneVerification", - "weight": 252, + "weight": 254, "cookies": false, "type": "", "deprecated": false, diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 20f64496ac..86c77812bd 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2006,6 +2006,7 @@ App::post('/v1/account/tokens/magic-url') $senderEmail = System::getEnv('_APP_SYSTEM_EMAIL_ADDRESS', APP_EMAIL_TEAM); $senderName = System::getEnv('_APP_SYSTEM_EMAIL_NAME', APP_NAME . ' Server'); + $replyTo = ""; if ($smtpEnabled) { diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index d8d496089c..1548778ceb 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -3115,7 +3115,6 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') ->alias('/v1/database/collections/:collectionId/documents', ['databaseId' => 'default']) ->desc('Create document') ->groups(['api', 'database']) - ->label('event', 'databases.[databaseId].collections.[collectionId].documents.[documentId].create') ->label('scope', 'documents.write') ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'document.create') @@ -3137,33 +3136,79 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') model: Response::MODEL_DOCUMENT, ) ], - contentType: ContentType::JSON + contentType: ContentType::JSON, + parameters: [ + 'databaseId' => ['optional' => false], + 'collectionId' => ['optional' => false], + 'documentId' => ['optional' => false], + 'data' => ['optional' => false], + 'permissions' => ['optional' => true], + ] + ), + new Method( + namespace: 'databases', + name: 'createDocuments', + description: '/docs/references/databases/create-document.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_DOCUMENT_LIST, + ) + ], + contentType: ContentType::JSON, + parameters: [ + 'databaseId' => ['optional' => false], + 'collectionId' => ['optional' => false], + 'documents' => ['optional' => false], + ] ) ] ) ->param('databaseId', '', new UID(), 'Database ID.') - ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') + ->param('documentId', '', new CustomId(), 'Document ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.', true) ->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). Make sure to define attributes before creating documents.') - ->param('data', [], new JSON(), 'Document data as JSON object.') + ->param('data', [], new JSON(), 'Document data as JSON object.', true) + ->param('documents', [], new ArrayList(new JSON(), APP_LIMIT_DOCUMENTS_CREATE), 'Array of documents data as JSON object.', true) ->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE, [Database::PERMISSION_READ, Database::PERMISSION_UPDATE, Database::PERMISSION_DELETE, Database::PERMISSION_WRITE]), 'An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true) ->inject('response') ->inject('dbForProject') ->inject('user') ->inject('queueForEvents') ->inject('queueForStatsUsage') - ->action(function (string $databaseId, string $documentId, string $collectionId, string|array $data, ?array $permissions, Response $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage) { + ->inject('project') + ->action(function (string $databaseId, ?string $documentId, string $collectionId, string|array|null $data, ?array $documents, ?array $permissions, Response $response, Database $dbForProject, Document $user, Event $queueForEvents, StatsUsage $queueForStatsUsage, Document $project) { + $data = \is_string($data) + ? \json_decode($data, true) + : $data; - $data = (\is_string($data)) ? \json_decode($data, true) : $data; // Cast to JSON array + $isBulk = true; - if (empty($data)) { + if (empty($data) && empty($documents)) { throw new Exception(Exception::DOCUMENT_MISSING_DATA); } - - if (isset($data['$id'])) { - throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, '$id is not allowed for creating new documents, try update instead'); + if (!empty($data) && !empty($documents)) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'You can only send one of the following parameters: data, documents'); + } + if (!empty($data) && empty($documentId)) { + throw new Exception(Exception::DOCUMENT_MISSING_DATA, 'Document ID is required when creating a single document'); + } + if (!empty($documents) && !empty($documentId)) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Param "documentId" is disallowed when creating multiple documents, set "$id" in each document instead'); + } + if (!empty($documents) && !empty($permissions)) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Param "permissions" is disallowed when creating multiple documents, set "$permissions" in each document instead'); } - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if (!empty($data)) { + $isBulk = false; + $documents = [$data]; + } + + $database = Authorization::skip(fn () => $dbForProject->getDocument( + 'databases', + $databaseId + )); $isAPIKey = Auth::isAppUser(Authorization::getRoles()); $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); @@ -3184,43 +3229,45 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') Database::PERMISSION_DELETE, ]; - // Map aggregate permissions to into the set of individual permissions they represent. - $permissions = Permission::aggregate($permissions, $allowedPermissions); - - // Add permissions for current the user if none were provided. - if (\is_null($permissions)) { - $permissions = []; - if (!empty($user->getId())) { - foreach ($allowedPermissions as $permission) { - $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); - } + $setPermissions = function (Document $document, ?array $permissions) use ($user, $allowedPermissions, $isAPIKey, $isPrivilegedUser, $isBulk) { + if ($isBulk) { + $permissions = $document['$permissions'] ?? null; } - } - // Users can only manage their own roles, API keys and Admin users can manage any - if (!$isAPIKey && !$isPrivilegedUser) { - foreach (Database::PERMISSIONS as $type) { - foreach ($permissions as $permission) { - $permission = Permission::parse($permission); - if ($permission->getPermission() != $type) { - continue; - } - $role = (new Role( - $permission->getRole(), - $permission->getIdentifier(), - $permission->getDimension() - ))->toString(); - if (!Authorization::isRole($role)) { - throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); + $permissions = Permission::aggregate($permissions, $allowedPermissions); + + // Add permissions for current the user if none were provided. + if (\is_null($permissions)) { + $permissions = []; + if (!empty($user->getId())) { + foreach ($allowedPermissions as $permission) { + $permissions[] = (new Permission($permission, 'user', $user->getId()))->toString(); } } } - } - $data['$collection'] = $collection->getId(); // Adding this param to make API easier for developers - $data['$id'] = $documentId == 'unique()' ? ID::unique() : $documentId; - $data['$permissions'] = $permissions; - $document = new Document($data); + // Users can only manage their own roles, API keys and Admin users can manage any + if (!$isAPIKey && !$isPrivilegedUser) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', Authorization::getRoles()) . ')'); + } + } + } + } + + $document->setAttribute('$permissions', $permissions); + }; $operations = 0; @@ -3306,21 +3353,50 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') } }; - $checkPermissions($collection, $document, Database::PERMISSION_CREATE); + $documents = array_map(function ($document) use ($collection, $permissions, $checkPermissions, $isBulk, $documentId, $setPermissions) { + $document['$collection'] = $collection->getId(); + + if (!$isBulk) { + $document['$id'] = $documentId == 'unique()' ? ID::unique() : $documentId; + } else { + if (empty($document['$id'])) { + throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, '$id must be set in each document when creating bulk documents'); + } + + $document['$id'] = $document['$id'] == 'unique()' ? ID::unique() : $document['$id']; + } + + $document = new Document($document); + + $setPermissions($document, $permissions); + $checkPermissions($collection, $document, Database::PERMISSION_CREATE); + + return $document; + }, $documents); try { - $document = $dbForProject->createDocument('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $document); + $dbForProject->createDocuments( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $documents, + APP_LIMIT_DATABASE_BATCH + ); } catch (StructureException $e) { throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $e->getMessage()); - } catch (DuplicateException $e) { + } catch (DuplicateException) { throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS); - } catch (NotFoundException $e) { + } catch (NotFoundException) { throw new Exception(Exception::COLLECTION_NOT_FOUND); } + $queueForEvents + ->setParam('databaseId', $databaseId) + ->setParam('collectionId', $collection->getId()) + ->setContext('collection', $collection) + ->setContext('database', $database); // Add $collectionId and $databaseId for all documents - $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { + $processDocument = function (Document $collection, Document &$document) use (&$processDocument, $dbForProject, $database) { + $document->removeAttribute('$collection'); $document->setAttribute('$databaseId', $database->getId()); $document->setAttribute('$collectionId', $collection->getId()); @@ -3352,34 +3428,35 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/documents') } }; - $processDocument($collection, $document); + foreach ($documents as $document) { + $processDocument($collection, $document); + } $queueForStatsUsage ->addMetric(METRIC_DATABASES_OPERATIONS_WRITES, $operations) ->addMetric(str_replace('{databaseInternalId}', $database->getInternalId(), METRIC_DATABASE_ID_OPERATIONS_WRITES), $operations) ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collection->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_STORAGE), 1); // per collection - $response->addHeader('X-Debug-Operations', $operations); - $response ->setStatusCode(Response::STATUS_CODE_CREATED) - ->dynamic($document, Response::MODEL_DOCUMENT); + ->addHeader('X-Debug-Operations', $operations); - $relationships = \array_map( - fn ($document) => $document->getAttribute('key'), - \array_filter( - $collection->getAttribute('attributes', []), - fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP - ) - ); + if ($isBulk) { + $response->dynamic(new Document([ + 'total' => count($documents), + 'documents' => $documents + ]), Response::MODEL_DOCUMENT_LIST); + } else { + $queueForEvents + ->setParam('documentId', $document->getId()) + ->setEvent('databases.[databaseId].collections.[collectionId].documents.[documentId].create'); + + $response->dynamic( + $documents[0], + Response::MODEL_DOCUMENT + ); + } - $queueForEvents - ->setParam('databaseId', $databaseId) - ->setParam('collectionId', $collection->getId()) - ->setParam('documentId', $document->getId()) - ->setContext('collection', $collection) - ->setContext('database', $database) - ->setPayload($response->getPayload(), sensitive: $relationships); }); App::get('/v1/databases/:databaseId/collections/:collectionId/documents') @@ -3467,7 +3544,6 @@ App::get('/v1/databases/:databaseId/collections/:collectionId/documents') $operations++; - $document->removeAttribute('$collection'); $document->setAttribute('$databaseId', $database->getId()); $document->setAttribute('$collectionId', $collection->getId()); @@ -4037,6 +4113,155 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents/:docum ->setPayload($response->getPayload(), sensitive: $relationships); }); +App::patch('/v1/databases/:databaseId/collections/:collectionId/documents') + ->desc('Update documents') + ->groups(['api', 'database']) + ->label('scope', 'documents.write') + ->label('resourceType', RESOURCE_TYPE_DATABASES) + ->label('audits.event', 'documents.update') + ->label('audits.resource', 'database/{request.databaseId}/collection/{request.collectionId}') + ->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}') + ->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2) + ->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT) + ->label('sdk', new Method( + namespace: 'databases', + name: 'updateDocuments', + description: '/docs/references/databases/update-documents.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DOCUMENT_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->param('databaseId', '', new UID(), 'Database ID.') + ->param('collectionId', '', new UID(), 'Collection ID.') + ->param('data', [], new JSON(), 'Document data as JSON object. Include only attribute and value pairs to be updated.', true) + ->param('queries', [], new ArrayList(new Text(APP_LIMIT_ARRAY_ELEMENT_SIZE), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' queries are allowed, each ' . APP_LIMIT_ARRAY_ELEMENT_SIZE . ' characters long.', true) + ->inject('requestTimestamp') + ->inject('response') + ->inject('dbForProject') + ->inject('project') + ->action(function (string $databaseId, string $collectionId, string|array $data, array $queries, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, Document $project) { + $data = \is_string($data) + ? \json_decode($data, true) + : $data; + + if (empty($data)) { + throw new Exception(Exception::DOCUMENT_MISSING_PAYLOAD); + } + + $isAPIKey = Auth::isAppUser(Authorization::getRoles()); + $isPrivilegedUser = Auth::isPrivilegedUser(Authorization::getRoles()); + + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + + 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); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + $permissions = $data['$permissions'] ?? null; + + // Map aggregate permissions into the multiple permissions they represent. + $permissions = Permission::aggregate($permissions, [ + Database::PERMISSION_READ, + Database::PERMISSION_UPDATE, + Database::PERMISSION_DELETE, + ]); + + // Users can only manage their own roles, API keys and Admin users can manage any + $roles = Authorization::getRoles(); + if (!$isAPIKey && !$isPrivilegedUser && !\is_null($permissions)) { + foreach (Database::PERMISSIONS as $type) { + foreach ($permissions as $permission) { + $permission = Permission::parse($permission); + if ($permission->getPermission() != $type) { + continue; + } + $role = (new Role( + $permission->getRole(), + $permission->getIdentifier(), + $permission->getDimension() + ))->toString(); + if (!Authorization::isRole($role)) { + throw new Exception(Exception::USER_UNAUTHORIZED, 'Permissions must be one of: (' . \implode(', ', $roles) . ')'); + } + } + } + } + + if (!\is_null($permissions)) { + $data['$permissions'] = $permissions; + } + + $partialDocument = new Document($data); + + $documents = $dbForProject->withRequestTimestamp( + $requestTimestamp, + fn () => $dbForProject->updateDocuments( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $partialDocument, + $queries, + APP_LIMIT_DATABASE_BATCH + ) + ); + + $processDocument = function (Document $collection, Document $document) use (&$processDocument, $dbForProject, $database) { + $document->setAttribute('$databaseId', $database->getId()); + $document->setAttribute('$collectionId', $collection->getId()); + + $relationships = \array_filter( + $collection->getAttribute('attributes', []), + fn ($attribute) => $attribute->getAttribute('type') === Database::VAR_RELATIONSHIP + ); + + foreach ($relationships as $relationship) { + $related = $document->getAttribute($relationship->getAttribute('key')); + + if (empty($related)) { + continue; + } + if (!\is_array($related)) { + $related = [$related]; + } + + $relatedCollectionId = $relationship->getAttribute('relatedCollection'); + $relatedCollection = Authorization::skip( + fn () => $dbForProject->getDocument('database_' . $database->getInternalId(), $relatedCollectionId) + ); + + foreach ($related as $relation) { + if ($relation instanceof Document) { + $processDocument($relatedCollection, $relation); + } + } + } + }; + + foreach ($documents as $document) { + $processDocument($collection, $document); + } + + $response->dynamic(new Document([ + 'total' => \count($documents), + 'documents' => $documents + ]), Response::MODEL_DOCUMENT_LIST); + }); + App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:documentId') ->alias('/v1/database/collections/:collectionId/documents/:documentId', ['databaseId' => 'default']) ->desc('Delete document') @@ -4162,9 +4387,129 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu ->setContext('database', $database) ->setPayload($response->output($document, Response::MODEL_DOCUMENT), sensitive: $relationships); + $queueForStatsUsage + ->addMetric(str_replace(['{databaseInternalId}', '{collectionInternalId}'], [$database->getInternalId(), $collection->getInternalId()], METRIC_DATABASE_ID_COLLECTION_ID_STORAGE), 1); // per collection + $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', new Method( + namespace: 'databases', + name: 'deleteDocuments', + description: '/docs/references/databases/delete-documents.md', + auth: [AuthType::SESSION, AuthType::KEY, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DOCUMENT_LIST, + ) + ], + contentType: ContentType::JSON + )) + ->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('queueForStatsUsage') + ->inject('project') + ->action(function (string $databaseId, string $collectionId, array $queries, ?\DateTime $requestTimestamp, Response $response, Database $dbForProject, StatsUsage $queueForStatsUsage, 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); + } + + try { + $queries = Query::parseQueries($queries); + } catch (QueryException $e) { + throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage()); + } + + $documents = $dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $queries) { + return $dbForProject->deleteDocuments( + 'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), + $queries, + APP_LIMIT_DATABASE_BATCH + ); + }); + + // DB Storage Calculation + $queueForStatsUsage + ->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 1015400a12..9c4885a4e0 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -92,10 +92,17 @@ $eventDatabaseListener = function (Document $project, Document $document, Respon $usageDatabaseListener = function (string $event, Document $document, StatsUsage $queueForStatsUsage) { $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': $queueForStatsUsage->addMetric(METRIC_TEAMS, $value); // per project @@ -508,6 +515,8 @@ App::init() $dbForProject ->on(Database::EVENT_DOCUMENT_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) ->on(Database::EVENT_DOCUMENT_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) + ->on(Database::EVENT_DOCUMENTS_CREATE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) + ->on(Database::EVENT_DOCUMENTS_DELETE, 'calculate-usage', fn ($event, $document) => $usageDatabaseListener($event, $document, $queueForStatsUsage)) ->on(Database::EVENT_DOCUMENT_CREATE, 'create-trigger-events', fn ($event, $document) => $eventDatabaseListener( $project, $document, diff --git a/app/init/constants.php b/app/init/constants.php index 3383b28f57..1090b2068a 100644 --- a/app/init/constants.php +++ b/app/init/constants.php @@ -26,6 +26,8 @@ const APP_LIMIT_SUBSCRIBERS_SUBQUERY = 1_000_000; const APP_LIMIT_WRITE_RATE_DEFAULT = 60; // Default maximum write rate per rate period const APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT = 60; // Default maximum write rate period in seconds const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return in list API calls +const APP_LIMIT_DOCUMENTS_CREATE = 5_000; // Default maximum of how many documents can be inserted in a single request +const APP_LIMIT_DATABASE_BATCH = 1_000; // Default batch size for database operations const APP_KEY_ACCESS = 24 * 60 * 60; // 24 hours const APP_USER_ACCESS = 24 * 60 * 60; // 24 hours const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours diff --git a/composer.json b/composer.json index 53c2a6d482..1444d9231a 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ } }, "require": { - "php": ">=8.0.0", + "php": ">=8.3.0", "ext-curl": "*", "ext-imagick": "*", "ext-mbstring": "*", @@ -99,8 +99,8 @@ "php": "8.3" }, "allow-plugins": { - "php-http/discovery": false, - "tbachert/spi": false + "php-http/discovery": true, + "tbachert/spi": true } } } diff --git a/composer.lock b/composer.lock index ed19d10202..0ba2cf38c9 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": "44c6436ced36b0b026139edba252052e", + "content-hash": "54fc27a2c8d4f5ab4959dbc93be319e1", "packages": [ { "name": "adhocore/jwt", @@ -8406,7 +8406,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.0.0", + "php": ">=8.3.0", "ext-curl": "*", "ext-imagick": "*", "ext-mbstring": "*", diff --git a/docs/references/databases/create-document.md b/docs/references/databases/create-document.md index 643518df51..a7d31450ef 100644 --- a/docs/references/databases/create-document.md +++ b/docs/references/databases/create-document.md @@ -1 +1 @@ -Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. +Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console. diff --git a/docs/references/databases/delete-documents.md b/docs/references/databases/delete-documents.md new file mode 100644 index 0000000000..a7b05503de --- /dev/null +++ b/docs/references/databases/delete-documents.md @@ -0,0 +1 @@ +Bulk delete documents using queries, if no queries are passed then all documents are deleted. \ No newline at end of file diff --git a/docs/references/databases/update-documents.md b/docs/references/databases/update-documents.md new file mode 100644 index 0000000000..5f560c6435 --- /dev/null +++ b/docs/references/databases/update-documents.md @@ -0,0 +1 @@ +Update all documents that match your queries, if no queries are submitted then all documents are updated. You can pass only specific fields to be updated. \ No newline at end of file diff --git a/docs/tutorials/add-route.md b/docs/tutorials/add-route.md index ac6fd40bdb..53926f7002 100644 --- a/docs/tutorials/add-route.md +++ b/docs/tutorials/add-route.md @@ -85,13 +85,19 @@ App::post('/v1/account/create') ```php App::post('/v1/account/jwt') - ->label('sdk.auth', [APP_AUTH_TYPE_SESSION]) - ->label('sdk.namespace', 'account') - ->label('sdk.method', 'createJWT') - ->label('sdk.description', '/docs/references/account/create-jwt.md') - ->label('sdk.response.code', Response::STATUS_CODE_CREATED) - ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) - ->label('sdk.response.model', Response::MODEL_JWT) + ->label('sdk', new Method( + namespace: 'account', + name: 'createJWT', + description: '/docs/references/account/create-jwt.md', + auth: [], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_JWT, + ) + ], + responseType: ResponseType::JSON, + )) ``` #### Cache diff --git a/src/Appwrite/Specification/Format/OpenAPI3.php b/src/Appwrite/Specification/Format/OpenAPI3.php index bd5405539d..84feb6adcc 100644 --- a/src/Appwrite/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/Specification/Format/OpenAPI3.php @@ -131,10 +131,8 @@ class OpenAPI3 extends Format $additionalMethods = null; if (is_array($sdk)) { - $mainSdk = array_shift($sdk); $additionalMethods = $sdk; - - $sdk = $mainSdk; + $sdk = $sdk[0]; } /** @@ -202,14 +200,16 @@ class OpenAPI3 extends Format if (!empty($additionalMethods)) { - $temp['x-appwrite']['additional-methods'] = []; + $temp['x-appwrite']['methods'] = []; foreach ($additionalMethods as $method) { /** @var \Appwrite\SDK\Method $method */ + $desc = $method->getDescriptionFilePath(); $additionalMethod = [ 'name' => $method->getMethodName(), 'parameters' => [], 'required' => [], - 'responses' => [] + 'responses' => [], + 'description' => ($desc) ? \file_get_contents($desc) : '', ]; foreach ($method->getParameters() as $name => $param) { @@ -222,13 +222,20 @@ class OpenAPI3 extends Format foreach ($method->getResponses() as $response) { /** @var \Appwrite\SDK\Response $response */ - $additionalMethod['responses'][] = [ - 'code' => $response->getCode(), - 'model' => '#/components/schemas/' . $response->getModel() - ]; + if (\is_array($response->getModel())) { + $additionalMethod['responses'][] = [ + 'code' => $response->getCode(), + 'model' => \array_map(fn ($m) => '#/components/schemas/' . $m, $response->getModel()) + ]; + } else { + $additionalMethod['responses'][] = [ + 'code' => $response->getCode(), + 'model' => '#/components/schemas/' . $response->getModel() + ]; + } } - $temp['x-appwrite']['additional-methods'][] = $additionalMethod; + $temp['x-appwrite']['methods'][] = $additionalMethod; } } diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 7277e3ab2b..73b7cec923 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -130,10 +130,8 @@ class Swagger2 extends Format $additionalMethods = null; if (is_array($sdk)) { - $mainSdk = array_shift($sdk); $additionalMethods = $sdk; - - $sdk = $mainSdk; + $sdk = $sdk[0]; } $consumes = [$sdk->getRequestType()]; @@ -203,15 +201,17 @@ class Swagger2 extends Format } if (!empty($additionalMethods)) { - $temp['x-appwrite']['additional-methods'] = []; + $temp['x-appwrite']['methods'] = []; foreach ($additionalMethods as $method) { /** @var \Appwrite\SDK\Method $method */ + $desc = $method->getDescriptionFilePath(); + $additionalMethod = [ 'name' => $method->getMethodName(), 'parameters' => [], 'required' => [], 'responses' => [], - 'description' => $method->getDescription(), + 'description' => ($desc) ? \file_get_contents($desc) : '', ]; foreach ($method->getParameters() as $name => $param) { @@ -224,13 +224,20 @@ class Swagger2 extends Format foreach ($method->getResponses() as $response) { /** @var \Appwrite\SDK\Response $response */ - $additionalMethod['responses'][] = [ - 'code' => $response->getCode(), - 'model' => '#/definitions/' . $response->getModel() - ]; + if (\is_array($response->getModel())) { + $additionalMethod['responses'][] = [ + 'code' => $response->getCode(), + 'model' => \array_map(fn ($m) => '#/definitions/' . $m, $response->getModel()) + ]; + } else { + $additionalMethod['responses'][] = [ + 'code' => $response->getCode(), + 'model' => '#/definitions/' . $response->getModel() + ]; + } } - $temp['x-appwrite']['additional-methods'][] = $additionalMethod; + $temp['x-appwrite']['methods'][] = $additionalMethod; } } diff --git a/tests/benchmarks/bulk-operations/LargeDocumentCreation.js b/tests/benchmarks/bulk-operations/LargeDocumentCreation.js new file mode 100644 index 0000000000..c903ed2dba --- /dev/null +++ b/tests/benchmarks/bulk-operations/LargeDocumentCreation.js @@ -0,0 +1,127 @@ +import { check, sleep } from "k6"; +import http from "k6/http"; +import { provisionProject, provisionDatabase, cleanup, unique } from "./utils.js"; + +const millionRecords = 1_000_000; +const batchSize = 10_000; +const numBatches = millionRecords / batchSize; + +export function setup() { + const resources = provisionProject({ + endpoint: 'http://localhost/v1', + email: 'test@test.com', + password: 'password123', + name: 'Test User', + projectName: 'Large Document Creation Test' + }); + + const { databaseId, collectionId } = provisionDatabase({ + endpoint: 'http://localhost/v1', + apiHeaders: resources.apiHeaders + }); + + // Wait to ensure that provisioning is complete + sleep(5); + + // Create an index for the collection + const index = { + key: "name", + type: "fulltext", + orders: ["ASC"], + attributes: ["name", "email"] + }; + + const indexRes = http.post(`http://localhost/v1/databases/${databaseId}/collections/${collectionId}/indexes`, + JSON.stringify(index), { + headers: resources.apiHeaders + }); + + console.log(indexRes.status); + + check(indexRes, { + "status is 202": (r) => r.status === 202, + }); + + console.log(`----- Inserting ${millionRecords} documents in ${numBatches} batches of ${batchSize} -----`); + + const timeStart = new Date(); + + const requests = []; + for (let i = 0; i < numBatches; i++) { + const docs = Array.from({ length: batchSize }, () => ({ + $id: unique(), + name: "bulk_document", + age: Math.floor(Math.random() * 100), + email: `${unique()}@test.com`, + height: Math.random() * 100 + })); + requests.push({ + method: "POST", + url: `http://localhost/v1/databases/${databaseId}/collections/${collectionId}/documents`, + body: JSON.stringify({ documents: docs }), + params: { + headers: resources.apiHeaders, + timeout: '300s' + } + }); + } + + const responses = http.batch(requests); + responses.forEach((res, index) => { + if (res.status !== 201) { + throw new Error(`Batch ${index + 1} failed with status ${res.status}`); + } + }); + + const timeEnd = new Date(); + const timeTaken = timeEnd - timeStart; + console.log(`Created 1 million documents in ${timeTaken} milliseconds`); + + return { + databaseId, + collectionId, + apiHeaders: resources.apiHeaders, + resources + }; +} + +export default function (data) { + const docs = Array.from({ length: 10000 }, () => ({ + $id: unique(), + name: "performance_document", + age: Math.floor(Math.random() * 100), + email: `${unique()}@test.com`, + height: Math.random() * 100 + })); + + const payload = JSON.stringify({ documents: docs }); + const res = http.post( + `http://localhost/v1/databases/${data.databaseId}/collections/${data.collectionId}/documents`, + payload, + { + headers: data.apiHeaders, + timeout: '300s' + } + ); + + check(res, { + "status is 201": (r) => r.status === 201 + }); + + sleep(1); +} + +export function teardown(data) { + cleanup(data.resources); +} + +export const options = { + scenarios: { + large_document_creation: { + executor: 'per-vu-iterations', + vus: 1, + iterations: 20, + exec: 'default' + } + } +}; \ No newline at end of file diff --git a/tests/benchmarks/bulk-operations/documentCreation.js b/tests/benchmarks/bulk-operations/documentCreation.js new file mode 100644 index 0000000000..730b6bb541 --- /dev/null +++ b/tests/benchmarks/bulk-operations/documentCreation.js @@ -0,0 +1,82 @@ +import { check, sleep } from "k6"; +import http from "k6/http"; +import { provisionProject, provisionDatabase, cleanup, unique } from "./utils.js"; + +const amount = 10_000; + +export function setup() { + const resources = provisionProject({ + endpoint: 'http://localhost/v1', + email: 'test@test.com', + password: 'password123', + name: 'Test User', + projectName: 'Bulk Operations Test' + }); + + const { databaseId, collectionId } = provisionDatabase({ + endpoint: 'http://localhost/v1', + apiHeaders: resources.apiHeaders + }); + + sleep(3); // Await Attributes to be provisioned + + console.log(`----- Amount of documents: ${amount} -----`); + + return { + databaseId, + collectionId, + apiHeaders: resources.apiHeaders, + resources + }; +} + +export function teardown(data) { + cleanup(data.resources); +} + +let documents = Array(amount).fill({ + $id: "unique()", + name: "asd", +}); + +documents = documents.map((document) => { + return { + ...document, + age: Math.floor(Math.random() * 100), + email: `${unique()}@test.com`, + height: Math.random() * 100, + }; +}); + +export default function (data) { + const payload = JSON.stringify({ + documents, + }); + + const res = http.post( + `http://localhost/v1/databases/${data.databaseId}/collections/${data.collectionId}/documents`, + payload, + { + headers: data.apiHeaders + } + ); + + check(res, { + "status is 201": (r) => r.status === 201, + }); + + return { + resources: data.resources + }; +} + +export const options = { + scenarios: { + bulk_create: { + executor: 'per-vu-iterations', + vus: 1, + iterations: 20, + exec: 'default' + } + } +}; diff --git a/tests/benchmarks/bulk-operations/noisyNeighbor.js b/tests/benchmarks/bulk-operations/noisyNeighbor.js new file mode 100644 index 0000000000..4bfec4e564 --- /dev/null +++ b/tests/benchmarks/bulk-operations/noisyNeighbor.js @@ -0,0 +1,144 @@ +import { check, sleep } from "k6"; +import http from "k6/http"; +import { Trend } from "k6/metrics"; +import { provisionProject, provisionDatabase, cleanup, unique } from "./utils.js"; + +// Custom Trend metric for light response time tracking +export const lightResponseTime = new Trend("light_response_time", true); + +const BULK_AMOUNT = 100_000; // Heavy operation amount +const LIGHT_AMOUNT = 10; // Light operation amount + +export function setup() { + // Set up two separate projects - one for bulk operations (noisy neighbor) and one for light operations + const heavyResources = provisionProject({ + endpoint: 'http://localhost/v1', + email: 'heavy@test.com', + password: 'password123', + name: 'Heavy User', + projectName: 'Noisy Neighbor - Heavy' + }); + + const lightResources = provisionProject({ + endpoint: 'http://localhost/v1', + email: 'light@test.com', + password: 'password123', + name: 'Light User', + projectName: 'Noisy Neighbor - Light' + }); + + // Set up databases for both projects + const heavy = provisionDatabase({ + endpoint: 'http://localhost/v1', + apiHeaders: heavyResources.apiHeaders + }); + + const light = provisionDatabase({ + endpoint: 'http://localhost/v1', + apiHeaders: lightResources.apiHeaders + }); + + sleep(3); // Await Attributes to be provisioned + + console.log(`----- Heavy operations: ${BULK_AMOUNT} documents | Light operations: ${LIGHT_AMOUNT} document -----`); + + return { + heavy: { + databaseId: heavy.databaseId, + collectionId: heavy.collectionId, + apiHeaders: heavyResources.apiHeaders, + resources: heavyResources + }, + light: { + databaseId: light.databaseId, + collectionId: light.collectionId, + apiHeaders: lightResources.apiHeaders, + resources: lightResources + } + }; +} + +export function teardown(data) { + cleanup(data.heavy.resources); + cleanup(data.light.resources); +} + +// Create document payloads +function createDocuments(amount) { + let documents = Array(amount).fill({ + $id: "unique()", + name: "test", + }); + + return documents.map((document) => ({ + ...document, + age: Math.floor(Math.random() * 100), + email: `${unique()}@test.com`, + height: Math.random() * 100, + })); +} + +// Heavy operation function +export function heavy(data) { + const documents = createDocuments(BULK_AMOUNT); + const payload = JSON.stringify({ documents }); + + const res = http.post( + `http://localhost/v1/databases/${data.heavy.databaseId}/collections/${data.heavy.collectionId}/documents`, + payload, + { + headers: data.heavy.apiHeaders + } + ); + + check(res, { + "heavy operation status is 201": (r) => r.status === 201, + }); +} + +// Light operation function +export function light(data) { + const documents = createDocuments(LIGHT_AMOUNT); + const payload = JSON.stringify({ documents }); + + const startTime = new Date(); + const res = http.post( + `http://localhost/v1/databases/${data.light.databaseId}/collections/${data.light.collectionId}/documents`, + payload, + { + headers: data.light.apiHeaders + } + ); + const duration = new Date() - startTime; + + // Record the light operation response time using the custom Trend metric + lightResponseTime.add(duration); + + check(res, { + "light operation status is 201": (r) => r.status === 201, + }); +} + +export const options = { + scenarios: { + // Heavy bulk operations running continuously + heavy_load: { + executor: 'constant-vus', + vus: 5, + duration: '30s', + exec: 'heavy' + }, + // Light operations to measure impact + light_operations: { + executor: 'constant-arrival-rate', + rate: 5, + timeUnit: '1s', + duration: '30s', + preAllocatedVUs: 10, + exec: 'light' + } + }, + thresholds: { + http_req_duration: ['p(95)<2000'], // 95% of requests should complete within 2s + } +}; \ No newline at end of file diff --git a/tests/benchmarks/bulk-operations/utils.js b/tests/benchmarks/bulk-operations/utils.js new file mode 100644 index 0000000000..dc8dcac569 --- /dev/null +++ b/tests/benchmarks/bulk-operations/utils.js @@ -0,0 +1,336 @@ +import http from 'k6/http'; +import { check } from 'k6'; + +/** + * @typedef {Object} AuthHeaders + * @property {string} 'Content-Type' - Content type header + * @property {string} 'Cookie' - Session cookie + * @property {string} 'X-Appwrite-Project' - Project ID header + */ + +/** + * @typedef {Object} ApiHeaders + * @property {string} 'Content-Type' - Content type header + * @property {string} 'X-Appwrite-Project' - Project ID header + * @property {string} 'X-Appwrite-Key' - API key header + */ + +/** + * @typedef {Object} ProvisionedResources + * @property {string} userId - The ID of the created user + * @property {string} teamId - The ID of the created team + * @property {string} projectId - The ID of the created project + * @property {string} cookies - Session cookies for authentication + * @property {AuthHeaders} headers - Headers for cookie-based authentication + * @property {string} apiKey - The API key secret + * @property {ApiHeaders} apiHeaders - Headers for API key authentication + */ + +function assert(response, checkName, condition) { + const result = check(response, { + [checkName]: condition + }); + if (!result) { + console.error(`Assertion failed: ${checkName}`); + console.error(`Response status: ${response.status}`); + console.error(`Response body: ${response.body}`); + throw new Error(`Assertion failed: ${checkName}`); + } +} + +/** + * Provisions an Appwrite project setup including: + * - Account creation + * - Session creation + * - Team creation + * - Project creation + * - API Key creation + * + * @param {Object} config Configuration object + * @param {string} config.endpoint Base endpoint URL (e.g., 'http://localhost:80/v1') + * @param {string} config.email Email for account creation + * @param {string} config.password Password for account creation + * @param {string} config.name Name for account creation + * @param {string} config.projectName Name for the project + * @returns {ProvisionedResources} Object containing all created resource IDs and session information + */ +export function provisionProject(config) { + const { + endpoint, + email, + password, + name, + projectName, + } = config; + + // Step 1: Create Account + const accountResponse = http.post(`${endpoint}/account`, JSON.stringify({ + userId: 'unique()', + email, + password, + name + }), { + headers: { + 'Content-Type': 'application/json', + } + }); + + assert(accountResponse, 'account created successfully', (r) => r.status === 201 || r.status === 409); + + const userId = accountResponse.json('$id'); + + // Step 2: Create Session + const sessionResponse = http.post(`${endpoint}/account/sessions/email`, JSON.stringify({ + email, + password + }), { + headers: { + 'Content-Type': 'application/json', + } + }); + + assert(sessionResponse, 'session created successfully', (r) => r.status === 201); + + // Keep manual control of the cookies to allow for simultaneous requests + const jar = http.cookieJar(); + jar.clear(`${endpoint}`); + + // Extract cookies for subsequent requests + const cookies = sessionResponse.headers['Set-Cookie']; + + // Common headers for authenticated requests + const authHeaders = { + 'Content-Type': 'application/json', + 'Cookie': cookies + }; + + // Step 3: Create Team + const teamResponse = http.post(`${endpoint}/teams`, JSON.stringify({ + teamId: 'unique()', + name: `${projectName} Team` + }), { + headers: authHeaders + }); + + assert(teamResponse, 'team created successfully', (r) => r.status === 201); + + const teamId = teamResponse.json('$id'); + + // Step 4: Create Project + const projectResponse = http.post(`${endpoint}/projects`, JSON.stringify({ + projectId: 'unique()', + name: projectName, + teamId: teamId + }), { + headers: authHeaders + }); + + assert(projectResponse, 'project created successfully', (r) => r.status === 201); + + const projectId = projectResponse.json('$id'); + + // Step 5: Create API Key + const apiKeyResponse = http.post(`${endpoint}/projects/${projectId}/keys`, JSON.stringify({ + name: 'Test API Key', + scopes: SCOPES, // All permissions + }), { + headers: authHeaders + }); + + assert(apiKeyResponse, 'api key created successfully', (r) => r.status === 201); + + const apiKey = apiKeyResponse.json('secret'); + + // Create a new headers object for API key authentication + const apiHeaders = { + 'Content-Type': 'application/json', + 'X-Appwrite-Project': projectId, + 'X-Appwrite-Key': apiKey + }; + + // Return all created resources and session info + return { + endpoint, + userId, + teamId, + projectId, + cookies, + headers: authHeaders, + apiKey, + apiHeaders + }; +} + +/** + * Example usage: + * + * const config = { + * endpoint: 'http://localhost:80/v1', + * email: 'test@example.com', + * password: 'complex-password', + * name: 'Test User', + * projectName: 'Test Project' + * }; + * + * const resources = provisionProject(config); + */ + +const SCOPES = [ + "sessions.write", + "users.read", + "users.write", + "teams.read", + "teams.write", + "databases.read", + "databases.write", + "collections.read", + "collections.write", + "attributes.read", + "attributes.write", + "indexes.read", + "indexes.write", + "documents.read", + "documents.write", + "files.read", + "files.write", + "buckets.read", + "buckets.write", + "functions.read", + "functions.write", + "execution.read", + "execution.write", + "targets.read", + "targets.write", + "providers.read", + "providers.write", + "messages.read", + "messages.write", + "topics.read", + "topics.write", + "subscribers.read", + "subscribers.write", + "locale.read", + "avatars.read", + "health.read", + "migrations.read", + "migrations.write" +] + +export function provisionDatabase(config) { + const { + endpoint, + apiHeaders + } = config; + + // Create database + const databaseResponse = http.post( + `${endpoint}/databases`, + JSON.stringify({ + databaseId: 'unique()', + name: 'Bulk Test DB' + }), + { headers: apiHeaders } + ); + + assert(databaseResponse, 'database created successfully', (r) => r.status === 201); + + const databaseId = databaseResponse.json('$id'); + + // Create collection + const collectionResponse = http.post( + `${endpoint}/databases/${databaseId}/collections`, + JSON.stringify({ + collectionId: 'unique()', + name: 'Bulk Test Collection', + permissions: ['read("any")', 'write("any")'], + documentSecurity: false + }), + { headers: apiHeaders } + ); + + assert(collectionResponse, 'collection created successfully', (r) => r.status === 201); + + const collectionId = collectionResponse.json('$id'); + + // Create name attribute + const nameAttributeResponse = http.post( + `${endpoint}/databases/${databaseId}/collections/${collectionId}/attributes/string`, + JSON.stringify({ + key: 'name', + size: 100, + required: false, + default: null, + array: false, + encrypt: false + }), + { headers: apiHeaders } + ); + + assert(nameAttributeResponse, 'name attribute created successfully', (r) => r.status === 202); + + // Create age attribute + const ageAttributeResponse = http.post( + `${endpoint}/databases/${databaseId}/collections/${collectionId}/attributes/integer`, + JSON.stringify({ + key: 'age', + required: false, + }), + { headers: apiHeaders } + ); + + assert(ageAttributeResponse, 'age attribute created successfully', (r) => r.status === 202); + + // Create email attribute + const emailAttributeResponse = http.post( + `${endpoint}/databases/${databaseId}/collections/${collectionId}/attributes/email`, + JSON.stringify({ + key: 'email', + required: false, + }), + { headers: apiHeaders } + ); + + assert(emailAttributeResponse, 'email attribute created successfully', (r) => r.status === 202); + + // Create height attribute + const heightAttributeResponse = http.post( + `${endpoint}/databases/${databaseId}/collections/${collectionId}/attributes/float`, + JSON.stringify({ + key: 'height', + required: false, + }), + { headers: apiHeaders } + ); + + assert(heightAttributeResponse, 'height attribute created successfully', (r) => r.status === 202); + + return { + databaseId, + collectionId + }; +} + +export function cleanup(config) { + const { + endpoint, + teamId, + headers + } = config; + + // Delete Organization + const organizationResponse = http.del( + `${endpoint}/teams/${teamId}`, + null, + { + headers + } + ); + + assert(organizationResponse, 'organization deleted successfully', (r) => r.status === 204); +} + +export function unique() { + const timestamp = Date.now().toString(36); + const randomPart = Math.random().toString(36).substring(2, 15); + return `${timestamp}-${randomPart}`; +} \ No newline at end of file diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 0f57f94515..a7c4c13c31 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -1581,12 +1581,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; } @@ -4865,5 +4859,1190 @@ trait DatabasesBase ]); $this->assertEquals(408, $response['headers']['status-code']); + + $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + } + + public function testBulkCreate(): void + { + // 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 Create 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 Create Perms', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + sleep(1); + + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ], + [ + '$id' => ID::unique(), + 'number' => 2, + ], + [ + '$id' => ID::unique(), + 'number' => 3, + ], + ], + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + $this->assertCount(3, $response['body']['documents']); + + $response = $this->client->call(Client::METHOD_GET, "/databases/{$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->assertCount(3, $response['body']['documents']); + + // TEST FAIL - Can't use data and document together + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 5 + ], + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ] + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals('You can only send one of the following parameters: data, documents', $response['body']['message']); + + // TEST FAIL - Can't use $documentId and create bulk documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ] + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't miss $id in bulk documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => [ + [ + 'number' => 1, + ] + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't miss number in bulk documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ], + [ + '$id' => ID::unique(), + ], + ], + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + + // TEST FAIL - Can't push more than 10000 documents + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => array_fill(0, 10001, [ + '$id' => ID::unique(), + 'number' => 1, + ]), + ]); + + $this->assertEquals(400, $response['headers']['status-code']); + $this->assertEquals('Invalid `documents` param: Value must a valid array no longer than 10000 items and Value must be a valid JSON string', $response['body']['message']); + } + + public function testBulkCreateRelationships(): void + { + $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 Creates Relationships' + ]); + + $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); + + $response = $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()), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'name' => 'Document 1', + 'collection2' => [ + [ + '$id' => ID::unique(), + 'name' => 'Document 2', + ], + [ + '$id' => ID::unique(), + 'name' => 'Document 3', + ], + ], + ], + [ + '$id' => ID::unique(), + 'name' => 'Document 2', + 'collection2' => [ + [ + '$id' => ID::unique(), + 'name' => 'Document 4', + ], + [ + '$id' => ID::unique(), + 'name' => 'Document 5', + ], + ], + ], + ], + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + $this->assertCount(2, $response['body']['documents']); + + $response = $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, $response['headers']['status-code']); + $this->assertEquals(2, $response['body']['total']); + + $response = $this->client->call(Client::METHOD_GET, "/databases/{$databaseId}/collections/{$collection2}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(4, $response['body']['total']); + } + + public function testBulkDeletes(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Deletes', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + // wait for database worker to create attributes + sleep(2); + + // Create documents + $createBulkDocuments = function ($amount = 10) use ($data) { + $documents = []; + + for ($x = 0; $x <= $amount; $x++) { + $documents[] = [ + '$id' => ID::unique(), + 'number' => $x, + ]; + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => $documents, + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + }; + + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + // TEST: Delete all documents + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(11, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(0, $documents['body']['total']); + + // TEST: Delete documents with query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::lessThan('number', 5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(6, $documents['body']['total']); + + foreach ($documents['body']['documents'] as $document) { + $this->assertGreaterThanOrEqual(5, $document['number']); + } + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + // SUCCESS: Delete documents with query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::lessThan('number', 5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(6, $documents['body']['total']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + // SUCCESS: Delete Documents with limit query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::limit(2)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(2, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(9, $documents['body']['total']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(9, $response['body']['total']); + + // SUCCESS: Delete Documents with offset query + $createBulkDocuments(); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(11, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [ + Query::offset(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(5, $documents['body']['total']); + + $lastDoc = end($documents['body']['documents']); + + $this->assertNotEmpty($lastDoc); + $this->assertEquals(4, $lastDoc['number']); + + // Cleanup + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(5, $response['body']['total']); + + // SUCCESS: Delete over 1k documents + $createBulkDocuments(1000); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(1001, $documents['body']['total']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(1001, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(0, $documents['body']['total']); + + // Delete Database + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + } + + public function testBulkDeletesRelationshipRestrict() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_MANY, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_RESTRICT, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + [ + 'name' => 'Document 2', + ], + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(403, $response['headers']['status-code']); + $this->assertEquals('document_delete_restricted', $response['body']['type']); + } + + public function testBulkDeletesRelationshipNull() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_MANY, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_SET_NULL, + 'twoWay' => true, + 'twoWayKey' => 'collection1', + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + [ + 'name' => 'Document 2', + ], + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + + $document2 = $document1['body']['collection2'][0]['$id']; + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + + $document2 = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents/' . $document2, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $document2['headers']['status-code']); + $this->assertEmpty($document2['body']['collection1']); + } + + public function testBulkDeletesRelationshipCascade() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + ], + ]); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_ONE, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_CASCADE + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + for ($i = 0; $i < 5; $i++) { + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + 'name' => 'Document 2', + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + } + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + + $collection1docs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $collection1docs['headers']['status-code']); + $this->assertEquals(0, $collection1docs['body']['total']); + + $collection2docs = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $collection2docs['headers']['status-code']); + $this->assertEquals(0, $collection2docs['body']['total']); + } + + public function testBulkUpdates(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Updates' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Updates', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + // wait for database worker to create attributes + sleep(2); + + // Create documents + $createBulkDocuments = function ($amount = 10) use ($data) { + $documents = []; + + for ($x = 1; $x <= $amount; $x++) { + $documents[] = [ + '$id' => ID::unique(), + 'number' => $x, + ]; + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => $documents, + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + }; + + $createBulkDocuments(); + + // TEST: Update all documents + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 100 + ], + 'permissions' => [ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + Query::equal('number', [100])->toString(), + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + foreach ($documents['body']['documents'] as $document) { + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], $document['$permissions']); + $this->assertEquals($collection['body']['$id'], $document['$collectionId']); + $this->assertEquals($data['databaseId'], $document['$databaseId']); + } + + // TEST: Check permissions persist + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 200 + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + Query::equal('number', [200])->toString(), + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + foreach ($documents['body']['documents'] as $document) { + $this->assertEquals([ + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ], $document['$permissions']); + } + + // TEST: Update documents with limit + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 300 + ], + 'queries' => [ + Query::limit(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(5, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [200])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(5, $documents['body']['total']); + + // TEST: Update documents with offset + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 300 + ], + 'queries' => [ + Query::offset(5)->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(5, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [300])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); + + // TEST: Update documents with equals filter + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 400 + ], + 'queries' => [ + Query::equal('number', [300])->toString(), + ], + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(10, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'queries' => [Query::equal('number', [400])->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(10, $documents['body']['total']); } } diff --git a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php index 8484996058..279657201b 100644 --- a/tests/e2e/Services/Databases/DatabasesCustomClientTest.php +++ b/tests/e2e/Services/Databases/DatabasesCustomClientTest.php @@ -10,6 +10,7 @@ use Utopia\Database\Database; use Utopia\Database\Helpers\ID; use Utopia\Database\Helpers\Permission; use Utopia\Database\Helpers\Role; +use Utopia\Database\Query; class DatabasesCustomClientTest extends Scope { @@ -890,4 +891,623 @@ class DatabasesCustomClientTest extends Scope $this->assertEquals(200, $response['headers']['status-code']); } + + public function testBulkCreatePermissions(): 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 Create' + ]); + + $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 Create', + 'documentSecurity' => false, + 'permissions' => [ + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + sleep(2); + + // TEST FAIL - Can't create document with missing collection level permissions + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ], + [ + '$id' => ID::unique(), + 'number' => 2, + ], + [ + '$id' => ID::unique(), + 'number' => 3, + ], + ], + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + $this->assertEquals('The current user is not authorized to perform the requested action.', $response['body']['message']); + + // TEST FAIL - Can't create document with missing document level permissions + $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 Creates Perms', + 'documentSecurity' => true + ]); + + $this->assertEquals(200, $collection['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + ], + [ + '$id' => ID::unique(), + 'number' => 2, + ], + [ + '$id' => ID::unique(), + 'number' => 3, + ], + ], + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + $this->assertEquals('The current user is not authorized to perform the requested action.', $response['body']['message']); + + // TEST FAIL - Can't create document with permissions that aren't our own. + $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 Creates Perms', + 'documentSecurity' => true, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(200, $collection['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + '$permissions' => [ + Permission::create(Role::user('aaaaaa')), + Permission::read(Role::user('aaaaaa')), + Permission::update(Role::user('aaaaaa')), + Permission::delete(Role::user('aaaaaa')), + ] + ], + [ + '$id' => ID::unique(), + 'number' => 2, + '$permissions' => [ + Permission::create(Role::user('aaaaaa')), + Permission::read(Role::user('aaaaaa')), + Permission::update(Role::user('aaaaaa')), + Permission::delete(Role::user('aaaaaa')), + ] + ], + [ + '$id' => ID::unique(), + 'number' => 3, + '$permissions' => [ + Permission::create(Role::user('aaaaaa')), + Permission::read(Role::user('aaaaaa')), + Permission::update(Role::user('aaaaaa')), + Permission::delete(Role::user('aaaaaa')), + ] + ], + ], + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + + // TEST SUCCESS - Can create document with our own permissions. + $response = $this->client->call(Client::METHOD_POST, "/databases/{$databaseId}/collections/{$data['$id']}/documents", array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documents' => [ + [ + '$id' => ID::unique(), + 'number' => 1, + '$permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + [ + '$id' => ID::unique(), + 'number' => 2, + '$permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + [ + '$id' => ID::unique(), + 'number' => 3, + '$permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])), + Permission::read(Role::user($this->getUser()['$id'])), + Permission::update(Role::user($this->getUser()['$id'])), + Permission::delete(Role::user($this->getUser()['$id'])), + ] + ], + ], + ]); + + $this->assertEquals(201, $response['headers']['status-code']); + $this->assertCount(3, $response['body']['documents']); + } + + // Bulk Updates + public function testBulkUpdatesPermissions(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Update Perms' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Updates Perms', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])) + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + sleep(2); + + // TEST: Update all documents with invalid collection level permissions + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 100 + ] + ]); + + $this->assertEquals(401, $response['headers']['status-code']); + + $collection = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Bulk Updates Perms', + 'documentSecurity' => true + ]); + + $this->assertEquals(200, $collection['headers']['status-code']); + + // TEST: Make sure we can update only documents we have permissions for + for ($i = 0; $i < 6; $i++) { + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => $i, + ], + 'permissions' => [ + Permission::update(Role::user($this->getUser()['$id'])) + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => 6, + ], + 'permissions' => [ + Permission::update(Role::user('user2')), + Permission::read(Role::user($this->getUser()['$id'])), + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'data' => [ + 'number' => 100 + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(6, $response['body']['documents']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'queries' => [Query::notEqual('number', 100)->toString()] + ]); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(1, $documents['body']['total']); + } + + public function testBulkUpdatesRelationship() + { + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Updates' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection1', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection1['headers']['status-code']); + + $collection2 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Collection2', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::any()), + Permission::read(Role::any()), + Permission::delete(Role::any()), + Permission::update(Role::any()), + ], + ]); + + $this->assertEquals(201, $collection1['headers']['status-code']); + + $collection1 = $collection1['body']['$id']; + $collection2 = $collection2['body']['$id']; + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/relationship', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'relatedCollectionId' => $collection2, + 'type' => Database::RELATION_ONE_TO_MANY, + 'key' => 'collection2', + 'onDelete' => Database::RELATION_MUTATE_RESTRICT, + 'twoWay' => true, + 'twoWayKey' => 'collection1', + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection2 . '/attributes/string', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'name', + 'size' => 256, + 'required' => true, + ]); + + sleep(3); + + $document1 = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'name' => 'Document 1', + 'collection2' => [ + [ + 'name' => 'Document 2', + ], + ], + ], + ]); + + $this->assertEquals(201, $document1['headers']['status-code']); + $document1 = $document1['body']['$id']; + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'data' => [ + 'name' => 'Document 1 Updated', + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertCount(1, $response['body']['documents']); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + + $document2 = $response['body']['documents'][0]; + + $this->assertEquals('Document 2', $document2['name']); + $this->assertEquals('Document 1 Updated', $document2['collection1']['name']); + + $response = $this->client->call(Client::METHOD_PATCH, '/databases/' . $databaseId . '/collections/' . $collection2 . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders()), [ + 'data' => [ + 'name' => 'Document 2 Updated', + ] + ]); + + $this->assertEquals(200, $response['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $collection1 . '/documents/' . $document1, array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'] + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals('Document 1 Updated', $response['body']['name']); + + $document2 = $response['body']['collection2'][0]; + $this->assertEquals('Document 2 Updated', $document2['name']); + } + + public function testBulkDeletesPermissions(): void + { + // Create database + $database = $this->client->call(Client::METHOD_POST, '/databases', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'databaseId' => ID::unique(), + 'name' => 'Bulk Deletes Perms' + ]); + + $this->assertNotEmpty($database['body']['$id']); + + $databaseId = $database['body']['$id']; + + $collection = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'collectionId' => ID::unique(), + 'name' => 'Bulk Deletes Perms', + 'documentSecurity' => false, + 'permissions' => [ + Permission::create(Role::user($this->getUser()['$id'])) + ], + ]); + + $this->assertEquals(201, $collection['headers']['status-code']); + + $data = [ + '$id' => $collection['body']['$id'], + 'databaseId' => $collection['body']['databaseId'] + ]; + + // Await attribute + $numberAttribute = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $data['$id'] . '/attributes/integer', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'key' => 'number', + 'required' => true, + ]); + + $this->assertEquals(202, $numberAttribute['headers']['status-code']); + + sleep(2); + + // TEST: Delete all documents with invalid collection level permissions + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(401, $response['headers']['status-code']); + + $collection = $this->client->call(Client::METHOD_PUT, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'], array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ]), [ + 'name' => 'Bulk Deletes Perms', + 'documentSecurity' => true + ]); + + $this->assertEquals(200, $collection['headers']['status-code']); + + // TEST: Make sure we can delete only documents we have permissions for + for ($i = 0; $i < 6; $i++) { + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => $i, + ], + 'permissions' => [ + Permission::delete(Role::user($this->getUser()['$id'])) + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + } + + $doc = $this->client->call(Client::METHOD_POST, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ], [ + 'documentId' => ID::unique(), + 'data' => [ + 'number' => 6, + ], + 'permissions' => [ + Permission::delete(Role::user('user2')) + ] + ]); + + $this->assertEquals(201, $doc['headers']['status-code']); + + $response = $this->client->call(Client::METHOD_DELETE, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders())); + + $this->assertEquals(200, $response['headers']['status-code']); + $this->assertEquals(6, $response['body']['total']); + + $documents = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['$id'] . '/documents', array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'] + ])); + + $this->assertEquals(200, $documents['headers']['status-code']); + $this->assertEquals(1, $documents['body']['total']); + } } diff --git a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php index e356397408..e251689475 100644 --- a/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php +++ b/tests/e2e/Services/Realtime/RealtimeCustomClientTest.php @@ -674,6 +674,7 @@ class RealtimeCustomClientTest extends Scope $user = $this->getUser(); $session = $user['session'] ?? ''; $projectId = $this->getProject()['$id']; + $documentIds = []; $client = $this->getWebsocket(['documents', 'collections'], [ 'origin' => 'http://localhost', @@ -763,6 +764,7 @@ class RealtimeCustomClientTest extends Scope $response = json_decode($client->receive(), true); $documentId = $document['body']['$id']; + $documentIds[] = $documentId; $this->assertArrayHasKey('type', $response); $this->assertArrayHasKey('data', $response);